step-up 0.9.9 → 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 741ce18e2574616e043e432311d193449f7c02ef
4
+ data.tar.gz: a17024a67859205ef4cda3743a4dce2f554ded7f
5
+ SHA512:
6
+ metadata.gz: 68f80d3c7e3df2e0eb0aefdd3f594df9b5b5afcd2d5ed89d91fbf0e00d18670c8ae86a92a9e256f087394d8ec590c803ff4d1e86cddaf9ed1c68814a74b3ff46
7
+ data.tar.gz: 760d780b3bd738f5466157e5086a456bacb0dc149a6053b6d3e8ade960670aa9789ae0f8a337f02945a59fb38d2bee59bbfddb86cf7026d64f91c1704ebe188b
data/.stepuprc CHANGED
@@ -1,6 +1,5 @@
1
1
  notes:
2
2
  after_versioned:
3
- #strategy: "remove"
4
3
  strategy: "keep"
5
4
  section: "versioning"
6
5
  changelog_message: "available on {version}"
@@ -0,0 +1 @@
1
+ v0.9.11
data/README.md CHANGED
@@ -1,31 +1,42 @@
1
1
  # StepUp: a project to step up your projects
2
2
  [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/kawamanza/step-up?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
3
+ [<img src="https://pledgie.com/campaigns/30770.png?skin_name=chrome" border="0" align="right" alt="Click here to lend your support to: StepUp Utility and make a donation at pledgie.com !"/>](https://pledgie.com/campaigns/30770)
3
4
 
4
- Project badges:
5
+ Project badges:
5
6
  [![Gem Version](https://badge.fury.io/rb/step-up.svg)](http://badge.fury.io/rb/step-up)
6
- [![GitHub version](https://badge.fury.io/gh/kawamanza%2Fstep-up.svg)](http://badge.fury.io/gh/kawamanza%2Fstep-up)
7
-
8
- Code badges:
7
+ [![GitHub version](https://badge.fury.io/gh/kawamanza%2Fstep-up.svg)](http://badge.fury.io/gh/kawamanza%2Fstep-up)
8
+ Code badges:
9
9
  [![Dependency Status](https://gemnasium.com/kawamanza/step-up.svg)](https://gemnasium.com/kawamanza/step-up)
10
10
 
11
+ ## Introduction
12
+
11
13
  StepUp is a tool to manage versioning.
12
14
  That means you can bump the version of your project, for example, from v3.0.11 to v4.0.0, check the current version, summarize all the history of versions in a changelog and more.
13
15
 
14
- StepUp is based on source control management features (i.e. tags, branches, commits, notes etc), so it doesn't need to keep files with the current version (but it supports it, if you want), it has visibility of all history of changes and versions (doesn't matter if they are spread in many different branches), which adds a variety of possibilities in terms of management, depending on your project needs.
16
+ StepUp is based on source control management features (i.e. tags, branches, commits, notes etc), so it doesn't need to keep files with the current version, it has visibility of all history of changes and versions (doesn't matter if they are spread in many different branches), which adds a variety of possibilities in terms of management, depending on your project needs.
15
17
 
16
- ## Installation
18
+ ## Features
17
19
 
18
- gem install step-up
20
+ * Allow you to attach notes to existing commits to mark fixes or new features that are being delivered.
21
+ * Organize notes into sections of bugfixes, features, minor changes and so on.
22
+ * View release notes for the next version of the project that will be boosted.
23
+ * Auto-increment the version of the project based in the release notes (according to [semver.org](http://semver.org/) guidelines).
19
24
 
20
- ## First of all
25
+ ## Installation
21
26
 
22
- Your installed git-scm version must be v1.7.1 or higher.
27
+ ```sh
28
+ $ gem install step-up
29
+ ```
23
30
 
24
31
  ## The Basics
25
32
 
26
33
  ### Checking current project version
27
34
 
28
- stepup [version]
35
+ Run the following command into your project's root folder:
36
+
37
+ ```sh
38
+ $ stepup [version]
39
+ ```
29
40
 
30
41
  An example of output would be
31
42
 
@@ -46,7 +57,7 @@ where **LEVEL_NAME**, by default, could be
46
57
  * patch
47
58
  * tiny
48
59
 
49
- This command will ask user to input a message for the version and will increment the version number accordingly.
60
+ This command will increment the version number according with the specified level.
50
61
 
51
62
  Each level corresponds to a position in the version mask.
52
63
  Considering default settings, this means:
@@ -63,6 +74,9 @@ The versioning increment is based on the last version tag found in the repositor
63
74
  As you can see, the TINY level is omitted when its value is zero.
64
75
  The mask allows you to configure the less relevant levels this way.
65
76
 
77
+ > **Note:**
78
+ > In order to maintain the convention indicated by the [semver.org](http://semver.org/), the TINY level will be deprecated in future releases.
79
+
66
80
  ### Checking out the changelog
67
81
 
68
82
  stepup changelog [--top=N]
@@ -115,9 +129,19 @@ The result would be something like the following:
115
129
  - rake db:seed
116
130
  - rake categories:reload
117
131
 
132
+ ## Continuous Integration
133
+
134
+ You can use the `stepup` commands to extract information of your project and display them on Continuous Integration tools.
135
+
136
+ ![Jenkins Example](https://raw.githubusercontent.com/kawamanza/step-up/master/docs/images/stepup_ci.png)
137
+
138
+ ## Contributing
118
139
 
119
- ## Project
120
- * https://github.com/kawamanza/step-up
140
+ 1. Fork it
141
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
142
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
143
+ 4. Push to the branch (`git push origin my-new-feature`)
144
+ 5. Create new Pull Request
121
145
 
122
146
  ## Report bugs and suggestions
123
147
  * [Issue Tracker](https://github.com/kawamanza/step-up/issues)
Binary file
@@ -9,6 +9,11 @@ module StepUp
9
9
 
10
10
  default_task :version
11
11
 
12
+ desc "commands", "list avaliable commands"
13
+ def commands
14
+ puts self.class.all_commands.keys.join " "
15
+ end
16
+
12
17
  desc "version ACTION [base_object] [OPTIONS]", "manage versions of your project"
13
18
  method_options %w[next-release -n] => :boolean # stepup version --next-release
14
19
  method_options %w(levels -L) => :boolean # $ stepup version [--levels|-L]
@@ -67,6 +72,7 @@ module StepUp
67
72
  method_options :"with-commit" => :boolean
68
73
  method_options %w[section -s] => :string
69
74
  method_options :sections => :array
75
+ method_options :force => :boolean
70
76
  def notes(action = "show", commit_base = nil)
71
77
  unless %w[show add remove help].include?(action)
72
78
  commit_base ||= action
@@ -200,6 +206,13 @@ module StepUp
200
206
  puts "This repository has no commit history"
201
207
  exit 1
202
208
  end
209
+ parents = `git rev-list --parents -n 1 #{last_commit.first}`.split(' ')
210
+ # Check if it is a merge-commit
211
+ if parents.size > 2 && ! options[:force]
212
+ puts "It's recommended not to add notes to merge-commit, but if you need to"
213
+ puts "do this anyway, please use the --force option."
214
+ exit 1
215
+ end
203
216
  unless message
204
217
  message = last_commit.last
205
218
  message << <<-TEXT
@@ -281,7 +294,13 @@ module StepUp
281
294
  mask = nil if mask !~ /0/
282
295
  version = nil
283
296
  if options[:"next-release"]
284
- tag = driver.cached_next_version_tag(commit_object, options[:level])
297
+ level = options[:level] || driver.next_release_level(commit_object)
298
+ unless STDIN.tty?
299
+ tag = STDIN.first.chomp
300
+ all_tags = driver.tags.scan(/[^\r\n]+/)
301
+ tag = all_tags.include?(tag) ? driver.mask.increase_version(tag, level) : nil
302
+ end
303
+ tag = tag || driver.cached_next_version_tag(commit_object, level)
285
304
  version = tag
286
305
  else
287
306
  version = driver(mask).last_version_tag(commit_object || "HEAD", true)
@@ -1,6 +1,5 @@
1
1
  notes:
2
2
  after_versioned:
3
- strategy: "keep" # Valid options: "keep" or "remove"
4
3
  section: "versioning"
5
4
  changelog_message: "available on {version}"
6
5
  sections:
@@ -21,7 +20,7 @@ notes:
21
20
  label: "Deploy steps:"
22
21
  tag: "deploy_step"
23
22
  versioning:
24
- version_mask: "v0.0.0.9"
23
+ version_mask: "v0.0.0"
25
24
  auto_increment:
26
25
  sections_level:
27
26
  minor:
@@ -34,4 +33,3 @@ versioning:
34
33
  - major
35
34
  - minor
36
35
  - patch
37
- - tiny
@@ -7,7 +7,7 @@ module StepUp
7
7
 
8
8
  module Notes
9
9
  def steps_for_archiving_notes(objects_with_notes, tag)
10
- strategy = CONFIG.notes.after_versioned.strategy
10
+ strategy = CONFIG.notes.after_versioned["strategy"] || "keep"
11
11
  raise ArgumentError, "unknown strategy: #{ strategy }" unless NOTES_STRATEGIES.include?(strategy)
12
12
  NOTES_STRATEGIES[strategy].steps_for_archiving_notes(objects_with_notes, tag, self)
13
13
  end
@@ -34,25 +34,6 @@ module StepUp
34
34
  end
35
35
 
36
36
  module Strategy
37
- class RemoveNotes
38
- def steps_for_archiving_notes(objects_with_notes, tag, driver)
39
- commands = []
40
- CONFIG.notes_sections.names.each do |section|
41
- next unless objects_with_notes.has_key?(section)
42
- removed_notes = []
43
- objects_with_notes[section].each do |object|
44
- next if object[2] == RangedNotes::COMMIT_NOTE
45
- removed_notes << "git notes --ref=#{ section } remove #{ object[0] }"
46
- end
47
- unless removed_notes.empty?
48
- commands += removed_notes
49
- commands << "git push #{ driver.notes_remote } refs/notes/#{ section }" if driver.cached_fetched_remotes.any?
50
- end
51
- end
52
- commands
53
- end
54
- end
55
-
56
37
  class KeepNotes
57
38
  def steps_for_archiving_notes(objects_with_notes, tag, driver)
58
39
  commands = []
@@ -74,7 +55,6 @@ module StepUp
74
55
  end
75
56
  end
76
57
  end
77
- register_notes_strategy "remove", Strategy::RemoveNotes.new
78
58
  register_notes_strategy "keep", Strategy::KeepNotes.new
79
59
  end
80
60
  end
@@ -22,7 +22,7 @@ module StepUp
22
22
  v = []
23
23
  mask.each_with_index do |part, index|
24
24
  level = version[index] || 0
25
- raise ArgumentError unless level.is_a?(Fixnum)
25
+ raise ArgumentError unless level.is_a?(Integer)
26
26
  unless level.zero? && part.last == '9'
27
27
  v << "#{part.first}#{level}"
28
28
  end
@@ -99,45 +99,6 @@ describe StepUp::Driver::Git do
99
99
  end
100
100
 
101
101
 
102
- context "using 'remove' as after_versioned:strategy" do
103
- before do
104
- StepUp::CONFIG.notes.after_versioned.stubs(:strategy).returns("remove")
105
- @steps = <<-STEPS
106
- git fetch
107
-
108
- git tag -a -m "Test changes:
109
-
110
- - removing files from gemspec
111
- - .gitignore
112
- - lastversion.gemspec
113
- - loading default configuration yaml
114
- - loading external configuration yaml
115
-
116
- Test bugfixes:
117
-
118
- - sorting tags according to the mask parser" v0.1.0 f4cfcc2
119
-
120
- git push origin refs/tags/v0.1.0
121
-
122
- git notes --ref=test_changes remove 8299243c7dac8f27c3572424a348a7f83ef0ce28
123
-
124
- git notes --ref=test_changes remove 2fb8a3281fb6777405aadcd699adb852b615a3e4
125
-
126
- git push origin refs/notes/test_changes
127
-
128
- git notes --ref=test_bugfixes remove d7b0fa26ca547b963569d7a82afd7d7ca11b71ae
129
-
130
- git push origin refs/notes/test_bugfixes
131
- STEPS
132
- @steps = @steps.rstrip.split(/\n\n/).collect{ |step| step.gsub(/^\s{8}/, '') }
133
- end
134
- it "should return steps" do
135
- @driver.should respond_to :steps_to_increase_version
136
- @driver.steps_to_increase_version("minor", "f4cfcc2").should be == @steps
137
- end
138
- end
139
-
140
-
141
102
  context "using 'keep' as after_versioned:strategy" do
142
103
  before do
143
104
  StepUp::CONFIG.notes.after_versioned.stubs(:strategy).returns("keep")
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: step-up
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9
5
- prerelease:
4
+ version: 0.9.11
6
5
  platform: ruby
7
6
  authors:
8
7
  - Marcelo Manzan
@@ -10,70 +9,80 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2015-11-24 00:00:00.000000000 Z
12
+ date: 2017-04-11 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: thor
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '0.14'
21
+ - - ">="
21
22
  - !ruby/object:Gem::Version
22
23
  version: 0.14.6
23
24
  type: :runtime
24
25
  prerelease: false
25
26
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
27
  requirements:
28
- - - ! '>='
28
+ - - "~>"
29
+ - !ruby/object:Gem::Version
30
+ version: '0.14'
31
+ - - ">="
29
32
  - !ruby/object:Gem::Version
30
33
  version: 0.14.6
31
34
  - !ruby/object:Gem::Dependency
32
35
  name: rspec
33
36
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
37
  requirements:
36
- - - ~>
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.11'
41
+ - - ">="
37
42
  - !ruby/object:Gem::Version
38
43
  version: 2.11.0
39
44
  type: :development
40
45
  prerelease: false
41
46
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
47
  requirements:
44
- - - ~>
48
+ - - "~>"
49
+ - !ruby/object:Gem::Version
50
+ version: '2.11'
51
+ - - ">="
45
52
  - !ruby/object:Gem::Version
46
53
  version: 2.11.0
47
54
  - !ruby/object:Gem::Dependency
48
55
  name: mocha
49
56
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
57
  requirements:
52
- - - ~>
58
+ - - "~>"
53
59
  - !ruby/object:Gem::Version
54
60
  version: 0.12.0
55
61
  type: :development
56
62
  prerelease: false
57
63
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
64
  requirements:
60
- - - ~>
65
+ - - "~>"
61
66
  - !ruby/object:Gem::Version
62
67
  version: 0.12.0
63
68
  - !ruby/object:Gem::Dependency
64
69
  name: rake
65
70
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
71
  requirements:
68
- - - ~>
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '10.4'
75
+ - - ">="
69
76
  - !ruby/object:Gem::Version
70
77
  version: 10.4.2
71
78
  type: :development
72
79
  prerelease: false
73
80
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
81
  requirements:
76
- - - ~>
82
+ - - "~>"
83
+ - !ruby/object:Gem::Version
84
+ version: '10.4'
85
+ - - ">="
77
86
  - !ruby/object:Gem::Version
78
87
  version: 10.4.2
79
88
  description: StepUp manages a project's versioning through its entire lifecycle
@@ -85,11 +94,13 @@ executables:
85
94
  extensions: []
86
95
  extra_rdoc_files: []
87
96
  files:
88
- - .stepuprc
97
+ - ".stepuprc"
98
+ - GEM_VERSION
89
99
  - Gemfile
90
100
  - README.md
91
101
  - Rakefile
92
102
  - bin/stepup
103
+ - docs/images/stepup_ci.png
93
104
  - lib/step-up.rb
94
105
  - lib/step-up/capistrano.rb
95
106
  - lib/step-up/cli.rb
@@ -103,41 +114,37 @@ files:
103
114
  - lib/step-up/parser/version_mask.rb
104
115
  - lib/step-up/ranged_notes.rb
105
116
  - lib/step-up/version.rb
106
- - templates/default/Capfile
107
- - templates/default/Gemfile
108
- - templates/default/Rakefile
109
- - templates/default/lib/version.rb
110
117
  - spec/lib/config_spec.rb
111
118
  - spec/lib/step-up/driver/git_spec.rb
112
119
  - spec/lib/step-up/parser/version_mask_spec.rb
113
120
  - spec/lib/step-up/ranged_notes_spec.rb
114
121
  - spec/spec_helper.rb
122
+ - templates/default/Capfile
123
+ - templates/default/Gemfile
124
+ - templates/default/Rakefile
125
+ - templates/default/lib/version.rb
115
126
  homepage: https://github.com/kawamanza/step-up
116
127
  licenses: []
128
+ metadata: {}
117
129
  post_install_message:
118
130
  rdoc_options: []
119
131
  require_paths:
120
132
  - lib
121
133
  required_ruby_version: !ruby/object:Gem::Requirement
122
- none: false
123
134
  requirements:
124
- - - ! '>='
135
+ - - ">="
125
136
  - !ruby/object:Gem::Version
126
137
  version: '0'
127
- segments:
128
- - 0
129
- hash: -3590876933529297334
130
138
  required_rubygems_version: !ruby/object:Gem::Requirement
131
- none: false
132
139
  requirements:
133
- - - ! '>='
140
+ - - ">="
134
141
  - !ruby/object:Gem::Version
135
142
  version: 1.3.6
136
143
  requirements: []
137
144
  rubyforge_project: step-up
138
- rubygems_version: 1.8.24
145
+ rubygems_version: 2.5.1
139
146
  signing_key:
140
- specification_version: 3
147
+ specification_version: 4
141
148
  summary: The best way to manage your project's versioning
142
149
  test_files:
143
150
  - spec/lib/config_spec.rb