summaryrefslogtreecommitdiff
path: root/spec/functional/resource/git_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* requires_git just doesn't exist anywhere, its not definedlcg/git-spec-cleanupLamont Granquist2020-07-241-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Don't try a git branch -f if already on the same branchMatthieu Serrepuy2020-07-101-0/+22
| | | | Signed-off-by: Matthieu Serrepuy <lotooo@gmail.com>
* Get lib/ free of spelling violations.Pete Higgins2020-05-181-6/+6
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Remove git func test for upstreamLamont Granquist2020-04-271-6/+0
| | | | | | | | | | | The output of this command seems to vary too much over different git versions to make it reliable and actually work. We should find something here that works, but determining what git commands to use which are stable for parsing can be very difficult. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* remove upstream test of deploy branchLamont Granquist2020-04-231-6/+1
| | | | | | | git isn't back consistent results for this API, i'm not sure what the correct stable API is to get this info from git. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-16 git provider fixesLamont Granquist2020-04-231-134/+195
| | | | | | | | | | | | | | | | | | | | | | | | The git provider now no longer checks out to a "deploy" branch by default and now checks out to the branch (with a remote upstream) or else checks out to a detatched head. The prior behavior can be restored by using "checkout branch 'deploy'". This also removes the SCM resource base class and replaces it with a resource partial and does some internal reorganization. It also introduces the RecipeDSLHelper for better functional tests and cleans up the functional tests of the git provider. Properties that were only ever implemented on the git provider were removed from the subversion provider where they had been inherited from the base class incorrectly. Some additional env var handling was added to the subversion handler in the process of sorting out the common properties, including HOME handling for alternative users. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Remove copyright dateslcg/remove-copyright-datesLamont Granquist2020-04-131-1/+1
| | | | | | | | Legally incredibly dubious, particularly since we don't follow it strictly as policy, and we have git history instead, which does it right. This is just a waste of time and a cargo cult. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/AlignArgumentslcg/new-chefstyleLamont Granquist2019-07-021-5/+5
| | | | | | | | | | | | | | this is using: Layout/AlignArguments: Enabled: true EnforcedStyle: with_fixed_indentation the default style can use really excessive whitespace. on starting lines which are already long, it fully indents across to where the arguments start and then begins the line there. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* changes for rubocop engine upgrades.lcg/rubocop-upgradesLamont Granquist2019-01-151-1/+1
| | | | | | | this is the result of changes to rules we already previously had enabled. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/IndentHeredocLamont Granquist2018-07-021-4/+4
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-021-15/+15
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Too much log output and unnecessary warnings! Suppress that shit.Kartik Null Cating-Subramanian2016-04-251-3/+1
|
* Exclude git from the fips acceptance testsJay Mundrawala2016-02-251-1/+1
| | | | We don't have git on those boxes
* autofixing auto-inserted delimiterslcg/chefstyle-batchLamont Granquist2016-02-091-1/+1
|
* auto fixing some rubocopsLamont Granquist2016-02-091-1/+1
| | | | | | | | | Style/NegatedWhile Style/ParenthesesAroundCondition Style/WhileUntilDo Style/WordArray Performance/ReverseEach Style/ColonMethodCall
* autofixing whitespace copsLamont Granquist2016-02-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
* Update all auth email address from opscode.com and getchef.com to chef.io.Noah Kantrowitz2016-02-021-1/+1
| | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
* Replace all Opscode copyrights with Chef Software.Noah Kantrowitz2016-02-021-1/+1
| | | Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-021-1/+1
| | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* Use double quotes by defaultThom May2016-01-141-16/+16
| | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* Instructions on running audit mode examples.Serdar Sutay2014-12-171-1/+1
|
* Update to RSpec 3.Claire McQuin2014-10-291-12/+12
|
* Fix chef spec infra to use OHAI correctly.sersut2014-03-071-1/+1
|
* set git user configuration to avoid promptingdanielsdeleo2013-06-131-0/+10
| | | | | | Depending on environment, git may prompt you to configure username and email when committing an annotated tag. Set local configuration in the repo to work around this.
* Merge branch 'master' into file-refactorsersut2013-06-061-1/+17
|\ | | | | | | | | | | | | Conflicts: lib/chef/provider/git.rb spec/unit/knife/configure_spec.rb spec/unit/provider/git_spec.rb
| * CHEF-4239: Handle specs run from dir with spaceBryan McLellan2013-06-041-1/+2
| |
| * CHEF-4239: Quote git repository attribute to handle spacesBryan McLellan2013-06-041-0/+15
| |
* | Make git_spec work with older git versions.sersut2013-06-051-1/+5
|/
* [CHEF-2420] Support annotated tags in the git providerSeth Falcon2013-05-241-0/+229
Annotated tags have their own SHA and also point to a SHA in the git repo. Using git ls-remote $REPO $TAG* the tagged SHAs can be identified by the '^{}' suffix appended to the corresponding tag name. When resolving the remote reference, we now search for $TAG* and use the SHA of the tagged commit (with ^{}) if it is there and otherwise use the SHA with an exact match for $TAG (to avoid capturing anything extra via the glob used to return refs). If no revision is specified, we force 'HEAD' in the git ls-remote call to constrain what can come back from the remote. Further, we protect against a badly chosen annotated tag named 'HEAD'. The functional test suite includes a git bundle of a small example repo. We found that locally cloning this bundle provided the closest simulation of `git ls-remote` behavior. YMMV depending on git version. The test suite could be extended to improve overall coverage, but does verify the desired behavior for annotated tags.