crackin 0.1.0 → 0.1.1.alpha0

Sign up to get free protection for your applications and to get access to all the features.
data/.crackin.yml CHANGED
@@ -1,13 +1,14 @@
1
1
  ---
2
2
  crackin:
3
3
  name: crackin
4
+ debug: true
4
5
  scm: git
5
6
  changelog: CHANGELOG.md
6
7
  branch:
7
8
  production: master
8
9
  development: develop
9
10
  status:
10
- verbose: true
11
+ verbose: false
11
12
  version: lib/crackin/version.rb
12
13
  build:
13
14
  command: rake build
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ### Changelog
2
2
 
3
+ ##### v0.1.1.alpha0:
4
+ * disable verbose status
5
+ * better debug handling for git
6
+ * add debug option. setup logging for Git if debug true
7
+ * add pull method
8
+ * do source.pull to make sure things are up to date
9
+ * add some basic documentation
10
+
3
11
  ##### v0.1.0:
4
12
  * add 'add' method to scm api
5
13
  * add some more inforation to initialization. fix bug with name of method in scm: git. make sure *all* files are added before commit during a crackin release finish.
data/README.md CHANGED
@@ -1,6 +1,23 @@
1
1
  # Crackin
2
2
 
3
- TODO: Write a gem description
3
+ Simple, generalized way to handle gem releases.
4
+
5
+ Much of this code has been developing over time
6
+ in a bunch of my projects. I decided to pull it
7
+ all together into one place.
8
+
9
+ ## Philosophy
10
+
11
+ * Use semantic versioning, as much as possible. http://semver.org
12
+ * doesn't currently support build numbers or architectures.
13
+ * Support MAJOR _1_.0.0 releases
14
+ * Support MINOR 0._1_.0 releases
15
+ * Support TINY 0.0._1_ releases
16
+ * Support TAG (pre) releases
17
+ * release candidate: 0.1.0._rc1_
18
+ * beta: 0.1.0._beta1_
19
+ * alpha: 0.1.0._alpha1_
20
+ * Manage the release process similar to git flow.
4
21
 
5
22
  ## Installation
6
23
 
@@ -18,7 +35,101 @@ Or install it yourself as:
18
35
 
19
36
  ## Usage
20
37
 
21
- TODO: Write usage instructions here
38
+ Once `Crackin` has been added to your bundle or installed, you can do the following:
39
+
40
+ `crackin init`
41
+
42
+ This will create a `.crackin.yml` file and a `CHANGELOG.md` file (if it doesn't already exist).
43
+ The command's output will prompt with you further inforamtion.
44
+
45
+ ## Status
46
+
47
+ Use the `crackin status` command to get more information. The general idea is:
48
+
49
+ 1. work on code in your development branch (default: 'develop')
50
+ or work on code in feature branches and merge to development branch
51
+ 2. once everything is merged to development and pushed, you can start a release.
52
+
53
+ 3. `crackin release <type>`
54
+ * create a temporary release branch from master
55
+ * merge from develop
56
+ * update version file
57
+ * update changelog file
58
+ * allow you to make any final updates (this is normally for customizing the changelog)
59
+ 4. Once you're finished with changes (you don't need to commit them).
60
+ 5. `crackin release finish`
61
+ * add and commit changes to release branch
62
+ * merge release branch to master
63
+ * create a tag
64
+ * run a gem build (currently uses bundler gem task)
65
+ * push master
66
+ * push tags
67
+ * push gem
68
+ * merge master to develop
69
+ * delete release branch (this should be configurable)
70
+ * push develop (not working currently)
71
+
72
+ ## Files
73
+
74
+ ### Configuration file
75
+
76
+ An example of the configuration file. _Subject to change_
77
+
78
+ ```
79
+ ---
80
+ crackin:
81
+ name: crackin
82
+ version: lib/crackin/version.rb
83
+ scm: git
84
+ changelog: CHANGELOG.md
85
+ branch:
86
+ production: master
87
+ development: develop
88
+ status:
89
+ verbose: true
90
+ build:
91
+ command: rake build
92
+ after: []
93
+ ```
94
+
95
+ Pay special attention to `name` and `version`, these values must be set after initialization.
96
+
97
+ ### Version file
98
+
99
+ The format that `Crackin` expects for the version.rb file of your gem.
100
+
101
+ ```
102
+ module Crackin
103
+ module Version
104
+ MAJOR = 0
105
+ MINOR = 1
106
+ TINY = 0
107
+ TAG = nil
108
+ LIST = [MAJOR, MINOR, TINY, TAG]
109
+ STRING = LIST.compact.join(".")
110
+ end
111
+ end
112
+ ```
113
+
114
+ It uses this format to manipulate the values during releases.
115
+
116
+ ### Changelog file
117
+
118
+ The format of the changelog file.
119
+
120
+ ```
121
+ ### Changelog
122
+
123
+ ##### v0.1.0:
124
+ * add 'add' method to scm api
125
+ * add some more inforation to initialization. fix bug with name of method in scm: git. make sure *all* files are added before commit during a crackin release finish.
126
+
127
+ ##### v0.0.1.rc0:
128
+ * initial
129
+ ```
130
+
131
+ Currently, `Crackin` just includes all commit *subjects* for each tag. It does this by walking the tags
132
+ and getting the commits between them.
22
133
 
23
134
  ## Contributing
24
135
 
@@ -10,4 +10,8 @@ class Hash
10
10
  def deep_stringify_keys
11
11
  deep_transform_keys{ |key| key.to_s }
12
12
  end unless Hash.respond_to?(:deep_stringify_keys)
13
+
14
+ def deep_symbolize_keys
15
+ deep_transform_keys{ |key| key.to_sym }
16
+ end unless Hash.respond_to?(:deep_symbolize_keys)
13
17
  end
@@ -65,6 +65,13 @@ module Crackin
65
65
 
66
66
  def start_actions
67
67
  actions = []
68
+ # update current branch
69
+ actions << {
70
+ name: "update branch",
71
+ do: -> { @source.pull },
72
+ undo: -> { @source.change_branch(@config['branch']['development']) },
73
+ if: @current == @config['branch']['development']
74
+ }
68
75
  # change branch
69
76
  actions << {
70
77
  name: "change to production branch",
@@ -8,7 +8,9 @@ module Crackin
8
8
  def initialize(config={})
9
9
  super
10
10
  #@git = ::Git.open(@options[:working], log: Logger.new(STDOUT))
11
- @git = ::Git.open(@options[:working])
11
+ o = {}
12
+ o['log'] = Logger.new(STDOUT) if config['debug']
13
+ @git = ::Git.open(@options[:working], o.deep_symbolize_keys)
12
14
  end
13
15
 
14
16
  def add(options={})
@@ -67,6 +69,10 @@ module Crackin
67
69
  @git.branch(Shellwords.escape(name)).delete
68
70
  end
69
71
 
72
+ def pull
73
+ @git.pull
74
+ end
75
+
70
76
  def push
71
77
  @git.push
72
78
  end
@@ -2,8 +2,8 @@ module Crackin
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 0
6
- TAG = nil
5
+ TINY = 1
6
+ TAG = 'alpha0'
7
7
  LIST = [MAJOR, MINOR, TINY, TAG]
8
8
  STRING = LIST.compact.join(".")
9
9
  end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crackin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1.alpha0
5
+ prerelease: 6
5
6
  platform: ruby
6
7
  authors:
7
8
  - Shawn Catanzarite
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-11-22 00:00:00.000000000 Z
12
+ date: 2014-02-05 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: git
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ! '>='
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ! '>='
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: clamp
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ! '>='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ! '>='
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: activesupport
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ! '>='
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: bundler
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ~>
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ~>
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: rake
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ! '>='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ! '>='
81
92
  - !ruby/object:Gem::Version
@@ -113,25 +124,29 @@ files:
113
124
  homepage: http://github.com/shawncatz/crackin
114
125
  licenses:
115
126
  - MIT
116
- metadata: {}
117
127
  post_install_message:
118
128
  rdoc_options: []
119
129
  require_paths:
120
130
  - lib
121
131
  required_ruby_version: !ruby/object:Gem::Requirement
132
+ none: false
122
133
  requirements:
123
134
  - - ! '>='
124
135
  - !ruby/object:Gem::Version
125
136
  version: '0'
137
+ segments:
138
+ - 0
139
+ hash: 3441222254428678362
126
140
  required_rubygems_version: !ruby/object:Gem::Requirement
141
+ none: false
127
142
  requirements:
128
- - - ! '>='
143
+ - - ! '>'
129
144
  - !ruby/object:Gem::Version
130
- version: '0'
145
+ version: 1.3.1
131
146
  requirements: []
132
147
  rubyforge_project:
133
- rubygems_version: 2.1.10
148
+ rubygems_version: 1.8.25
134
149
  signing_key:
135
- specification_version: 4
150
+ specification_version: 3
136
151
  summary: release the crackin - gem release management
137
152
  test_files: []
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YzQ0ZGVlMjc1NjM2YzI0ZDdkMWNjNGMwNTdjMDg3ZjRjYjI0Y2Q1Yg==
5
- data.tar.gz: !binary |-
6
- YjZmYWNjNDExNGNlODYzODhkZTFmNTE2M2JiMjFlYzYyNDc1YzBhOA==
7
- SHA512:
8
- metadata.gz: !binary |-
9
- ZmM1MjBmMmEyMTdjNjNiZDE1YzE3NjA2ZTU2YzE2M2M5YzQ1OWU4NWYxZjkz
10
- Y2FlMmI3N2YwNjNmZWViYmZlNGRiMjEzNjYzOTEyMmY2ZTI1ZTU0MWNmOWYy
11
- ZjgwNTYyOTlhNGE3MWY5YTExMjE5ZDAyZjA0ZDhlMmJiMTBhNjA=
12
- data.tar.gz: !binary |-
13
- OWI0ZTg1NDFjNWFmY2E5YmNhNjcxOTlmOWY1MjZhYjU4ZjQzNjZiZTFmZDcy
14
- M2QzM2RiNjhkYmZmY2E1YWVhOGJhMjNmNTM0OTM1ZmYyMTBiNDRmM2QzOTll
15
- MWQ3ZGM1NjExYmU3YzJiYWFmYjhmNGY5MmE3MDNhODJlMmQ0ZjQ=