crackin 0.0.3.rc0 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +9 -0
- data/bin/crackin +34 -2
- data/lib/crackin/release.rb +5 -0
- data/lib/crackin/scm/git.rb +5 -1
- data/lib/crackin/version.rb +3 -3
- data/lib/crackin/version_file.rb +2 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzQ0ZGVlMjc1NjM2YzI0ZDdkMWNjNGMwNTdjMDg3ZjRjYjI0Y2Q1Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjZmYWNjNDExNGNlODYzODhkZTFmNTE2M2JiMjFlYzYyNDc1YzBhOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZmM1MjBmMmEyMTdjNjNiZDE1YzE3NjA2ZTU2YzE2M2M5YzQ1OWU4NWYxZjkz
|
10
|
+
Y2FlMmI3N2YwNjNmZWViYmZlNGRiMjEzNjYzOTEyMmY2ZTI1ZTU0MWNmOWYy
|
11
|
+
ZjgwNTYyOTlhNGE3MWY5YTExMjE5ZDAyZjA0ZDhlMmJiMTBhNjA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWI0ZTg1NDFjNWFmY2E5YmNhNjcxOTlmOWY1MjZhYjU4ZjQzNjZiZTFmZDcy
|
14
|
+
M2QzM2RiNjhkYmZmY2E1YWVhOGJhMjNmNTM0OTM1ZmYyMTBiNDRmM2QzOTll
|
15
|
+
MWQ3ZGM1NjExYmU3YzJiYWFmYjhmNGY5MmE3MDNhODJlMmQ0ZjQ=
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
### Changelog
|
2
|
+
|
3
|
+
##### v0.1.0:
|
4
|
+
* add 'add' method to scm api
|
5
|
+
* 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.
|
6
|
+
|
7
|
+
##### v0.0.1.rc0:
|
8
|
+
* initial
|
9
|
+
|
data/bin/crackin
CHANGED
@@ -11,8 +11,37 @@ module Crackin
|
|
11
11
|
end
|
12
12
|
subcommand 'init', 'intialize a directory for use with crackin' do
|
13
13
|
def execute
|
14
|
+
puts "initializing"
|
14
15
|
data = {crackin: Crackin::Config.defaults}.deep_stringify_keys
|
15
|
-
File.open(".crackin.yml", "w+") {|f| f.write(data.to_yaml)}
|
16
|
+
File.open(".crackin.yml", "w+") { |f| f.write(data.to_yaml) }
|
17
|
+
puts ".. configuration file .crackin.yml created."
|
18
|
+
unless File.exists?("CHANGELOG.md")
|
19
|
+
File.open("CHANGELOG.md", "w+") { |f| f.write("### Changelog\n") }
|
20
|
+
puts ".. changelog file CHANGELOG.md created."
|
21
|
+
end
|
22
|
+
puts ""
|
23
|
+
puts <<-VERSION
|
24
|
+
Initialization is nearly complete.
|
25
|
+
|
26
|
+
First, you will need to update the .crackin.yml file with the name of your project.
|
27
|
+
Replace the <app> tokens in the file, with the name of your gem.
|
28
|
+
|
29
|
+
Second, Crackin depends on your version file having a structure similar to below.
|
30
|
+
Obviously you will need to change the module names to match your gems, but the structure
|
31
|
+
should be similar. Crackin matches the MAJOR, MINOR, TINY and TAG tokens and replaces
|
32
|
+
those lines with the correct values when doing a release.
|
33
|
+
|
34
|
+
module Crackin
|
35
|
+
module Version
|
36
|
+
MAJOR = 0
|
37
|
+
MINOR = 1
|
38
|
+
TINY = 0
|
39
|
+
TAG = 'beta0'
|
40
|
+
LIST = [MAJOR, MINOR, TINY, TAG]
|
41
|
+
STRING = LIST.compact.join(".")
|
42
|
+
end
|
43
|
+
end
|
44
|
+
VERSION
|
16
45
|
end
|
17
46
|
end
|
18
47
|
subcommand 'status', 'show status information' do
|
@@ -68,14 +97,17 @@ module Crackin
|
|
68
97
|
status = Crackin::Status.new
|
69
98
|
status.state == wanted
|
70
99
|
end
|
100
|
+
|
71
101
|
def release_start(type, real)
|
72
102
|
raise "cannot start release when you're not in state == development" unless state('development')
|
73
103
|
Crackin::Release.new(type).start(real: real)
|
74
104
|
end
|
105
|
+
|
75
106
|
def release_rollback(real)
|
76
107
|
raise "cannot rollback when you're not in state == releasing" unless state('releasing')
|
77
108
|
Crackin::Release.new(:none).rollback(real: real)
|
78
109
|
end
|
110
|
+
|
79
111
|
def release_finish(real)
|
80
112
|
raise "cannot finish when you're not in state == releasing" unless state('releasing')
|
81
113
|
Crackin::Release.new(:none).finish(real: real)
|
@@ -87,6 +119,6 @@ begin
|
|
87
119
|
Crackin::Command.run
|
88
120
|
rescue => e
|
89
121
|
puts "error: #{e.message}"
|
90
|
-
e.backtrace.each {|l| puts " #{l}"}
|
122
|
+
e.backtrace.each { |l| puts " #{l}" }
|
91
123
|
exit 1
|
92
124
|
end
|
data/lib/crackin/release.rb
CHANGED
@@ -109,6 +109,11 @@ module Crackin
|
|
109
109
|
puts "gem credentials are not saved, you must run 'gem push pkg/#{@config['name']}-#{@version.name}.gem' to set them"
|
110
110
|
return
|
111
111
|
end
|
112
|
+
# make sure all files are included
|
113
|
+
actions << {
|
114
|
+
name: "add files",
|
115
|
+
do: ->{ @source.add(all: true) },
|
116
|
+
}
|
112
117
|
# commit
|
113
118
|
actions << {
|
114
119
|
name: "commit version and changelog",
|
data/lib/crackin/scm/git.rb
CHANGED
@@ -11,6 +11,10 @@ module Crackin
|
|
11
11
|
@git = ::Git.open(@options[:working])
|
12
12
|
end
|
13
13
|
|
14
|
+
def add(options={})
|
15
|
+
@git.add(options)
|
16
|
+
end
|
17
|
+
|
14
18
|
def log
|
15
19
|
@git.log
|
16
20
|
end
|
@@ -103,7 +107,7 @@ module Crackin
|
|
103
107
|
@git.tags
|
104
108
|
end
|
105
109
|
|
106
|
-
def
|
110
|
+
def delete(name)
|
107
111
|
@git.tag_delete(name)
|
108
112
|
end
|
109
113
|
end
|
data/lib/crackin/version.rb
CHANGED
data/lib/crackin/version_file.rb
CHANGED
@@ -10,8 +10,9 @@ module Crackin
|
|
10
10
|
@major = $1.to_i if line =~ /MAJOR\s+=\s+(\d+)/
|
11
11
|
@minor = $1.to_i if line =~ /MINOR\s+=\s+(\d+)/
|
12
12
|
@tiny = $1.to_i if line =~ /TINY\s+=\s+(\d+)/
|
13
|
-
if line =~ /TAG\s+=\s+(
|
13
|
+
if line =~ /TAG\s+=\s+(.*)/
|
14
14
|
@tag = $1
|
15
|
+
@tag.gsub!(/['"]/, '')
|
15
16
|
@tag = nil if @tag == 'nil'
|
16
17
|
end
|
17
18
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crackin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shawn Catanzarite
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- .crackin.yml
|
92
92
|
- .gitignore
|
93
93
|
- .ruby-version
|
94
|
+
- CHANGELOG.md
|
94
95
|
- Gemfile
|
95
96
|
- LICENSE.txt
|
96
97
|
- README.md
|
@@ -124,9 +125,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
124
125
|
version: '0'
|
125
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
127
|
requirements:
|
127
|
-
- - ! '
|
128
|
+
- - ! '>='
|
128
129
|
- !ruby/object:Gem::Version
|
129
|
-
version:
|
130
|
+
version: '0'
|
130
131
|
requirements: []
|
131
132
|
rubyforge_project:
|
132
133
|
rubygems_version: 2.1.10
|