outline 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -0
- data/Rakefile +79 -8
- data/VERSION +1 -1
- data/outline.gemspec +19 -0
- metadata +14 -17
data/Gemfile
ADDED
data/Rakefile
CHANGED
@@ -10,37 +10,108 @@ def notify(message)
|
|
10
10
|
puts " -> #{'%0.04f' % (Time.now - start_time)}s"
|
11
11
|
end
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
VERSION_REGEXP = /VERSION = '((\d+)\.(\d+)\.(\d+))'/
|
14
|
+
|
15
|
+
namespace :version do
|
16
|
+
desc 'Display the current version'
|
17
|
+
task :current do
|
18
|
+
puts File.read('VERSION')
|
19
|
+
end
|
20
|
+
|
21
|
+
desc 'Update the version file to the latest version'
|
22
|
+
task :update_file do
|
23
|
+
notify "updating VERSION file to #{Outline::VERSION}" do
|
17
24
|
File.open('VERSION', 'w+') { |f| f.print Outline::VERSION }
|
18
25
|
end
|
19
26
|
end
|
20
27
|
|
28
|
+
namespace :bump do
|
29
|
+
desc 'Bump the major version'
|
30
|
+
task :major do
|
31
|
+
data = File.read('lib/outline.rb')
|
32
|
+
|
33
|
+
versions = { old: {}, new: {} }
|
34
|
+
versions[:old][:major], versions[:old][:minor], versions[:old][:patch] = data.match(VERSION_REGEXP).captures[1..-1].collect { |i| i.to_i }
|
35
|
+
versions[:new] = versions[:old].dup
|
36
|
+
versions[:new][:major] += 1
|
37
|
+
versions[:new][:minor] = 0
|
38
|
+
versions[:new][:patch] = 0
|
39
|
+
versions[:old][:string] = [ versions[:old][:major], versions[:old][:minor], versions[:old][:patch] ].join('.')
|
40
|
+
versions[:new][:string] = [ versions[:new][:major], versions[:new][:minor], versions[:new][:patch] ].join('.')
|
41
|
+
|
42
|
+
notify "updating version from #{versions[:old][:string]} to #{versions[:new][:string]}" do
|
43
|
+
File.open('lib/outline.rb', 'w+') { |f| f.print data.gsub(VERSION_REGEXP, "VERSION = '#{versions[:new][:string]}'") }
|
44
|
+
Outline::VERSION.replace(versions[:new][:string])
|
45
|
+
end
|
46
|
+
|
47
|
+
Rake::Task["version:update_file"].execute
|
48
|
+
end
|
49
|
+
|
50
|
+
desc 'Bump the minor version'
|
51
|
+
task :minor do
|
52
|
+
data = File.read('lib/outline.rb')
|
53
|
+
|
54
|
+
versions = { old: {}, new: {} }
|
55
|
+
versions[:old][:major], versions[:old][:minor], versions[:old][:patch] = data.match(VERSION_REGEXP).captures[1..-1].collect { |i| i.to_i }
|
56
|
+
versions[:new] = versions[:old].dup
|
57
|
+
versions[:new][:minor] += 1
|
58
|
+
versions[:new][:patch] = 0
|
59
|
+
versions[:old][:string] = [ versions[:old][:major], versions[:old][:minor], versions[:old][:patch] ].join('.')
|
60
|
+
versions[:new][:string] = [ versions[:new][:major], versions[:new][:minor], versions[:new][:patch] ].join('.')
|
61
|
+
|
62
|
+
notify "updating version from #{versions[:old][:string]} to #{versions[:new][:string]}" do
|
63
|
+
File.open('lib/outline.rb', 'w+') { |f| f.print data.gsub(VERSION_REGEXP, "VERSION = '#{versions[:new][:string]}'") }
|
64
|
+
Outline::VERSION.replace(versions[:new][:string])
|
65
|
+
end
|
66
|
+
|
67
|
+
Rake::Task["version:update_file"].execute
|
68
|
+
end
|
69
|
+
|
70
|
+
desc 'Bump the patch version'
|
71
|
+
task :patch do
|
72
|
+
data = File.read('lib/outline.rb')
|
73
|
+
|
74
|
+
versions = { old: {}, new: {} }
|
75
|
+
versions[:old][:major], versions[:old][:minor], versions[:old][:patch] = data.match(VERSION_REGEXP).captures[1..-1].collect { |i| i.to_i }
|
76
|
+
versions[:new] = versions[:old].dup
|
77
|
+
versions[:new][:patch] += 1
|
78
|
+
versions[:old][:string] = [ versions[:old][:major], versions[:old][:minor], versions[:old][:patch] ].join('.')
|
79
|
+
versions[:new][:string] = [ versions[:new][:major], versions[:new][:minor], versions[:new][:patch] ].join('.')
|
80
|
+
|
81
|
+
notify "updating version from #{versions[:old][:string]} to #{versions[:new][:string]}" do
|
82
|
+
File.open('lib/outline.rb', 'w+') { |f| f.print data.gsub(VERSION_REGEXP, "VERSION = '#{versions[:new][:string]}'") }
|
83
|
+
Outline::VERSION.replace(versions[:new][:string])
|
84
|
+
end
|
85
|
+
|
86
|
+
Rake::Task["version:update_file"].execute
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
namespace :gem do
|
21
92
|
desc 'Build the gem'
|
22
93
|
task :build do
|
23
|
-
notify '
|
94
|
+
notify 'building the gem' do
|
24
95
|
`gem build *.gemspec`
|
25
96
|
end
|
26
97
|
end
|
27
98
|
|
28
99
|
desc 'Push the gem to RubyGems'
|
29
100
|
task :push do
|
30
|
-
notify '
|
101
|
+
notify 'pushing gem' do
|
31
102
|
`gem push *.gem`
|
32
103
|
end
|
33
104
|
end
|
34
105
|
|
35
106
|
desc 'Move the gem to the pkg directory'
|
36
107
|
task :move do
|
37
|
-
notify '
|
108
|
+
notify 'moving the gem to pkg/' do
|
38
109
|
`mv *.gem pkg/`
|
39
110
|
end
|
40
111
|
end
|
41
112
|
|
42
113
|
desc 'Update VERSION, build the gem, push the gem, then move the gem to the pkg directory'
|
43
|
-
task deploy: [:
|
114
|
+
task deploy: [:build, :push, :move]
|
44
115
|
end
|
45
116
|
|
46
117
|
desc "Run all specs"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/outline.gemspec
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.author = "Ryan Scott Lewis"
|
3
|
+
s.email = "c00lryguy@gmail.com"
|
4
|
+
|
5
|
+
s.name = File.basename(__FILE__, ".gemspec")
|
6
|
+
s.description = "Easily set configurations on your Ruby apps."
|
7
|
+
s.summary = "Simplify your configurations."
|
8
|
+
s.homepage = "http://github.com/c00lryguy/#{s.name}"
|
9
|
+
s.version = File.read("VERSION")
|
10
|
+
s.license = 'MIT'
|
11
|
+
s.platform = Gem::Platform::RUBY
|
12
|
+
s.require_path = 'lib'
|
13
|
+
|
14
|
+
s.files = Dir['{{Rake,Gem}file{.lock,},README*,VERSION,LICENSE,*.gemspec,{bin,examples,lib,spec,test}/**/*}']
|
15
|
+
s.test_files = Dir['{examples,spec,test}/**/*']
|
16
|
+
|
17
|
+
s.add_dependency("meta_tools", "~> 0.2.7")
|
18
|
+
s.add_development_dependency("rspec", "~> 2.6.0")
|
19
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: outline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-15 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: meta_tools
|
16
|
-
requirement: &
|
16
|
+
requirement: &70315817270220 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.2.
|
21
|
+
version: 0.2.7
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70315817270220
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &70315817136080 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,21 +32,23 @@ dependencies:
|
|
32
32
|
version: 2.6.0
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70315817136080
|
36
36
|
description: Easily set configurations on your Ruby apps.
|
37
37
|
email: c00lryguy@gmail.com
|
38
38
|
executables: []
|
39
39
|
extensions: []
|
40
|
-
extra_rdoc_files:
|
41
|
-
- VERSION
|
40
|
+
extra_rdoc_files: []
|
42
41
|
files:
|
43
|
-
- VERSION
|
44
42
|
- Rakefile
|
45
43
|
- Gemfile.lock
|
44
|
+
- Gemfile
|
45
|
+
- VERSION
|
46
|
+
- outline.gemspec
|
46
47
|
- lib/outline.rb
|
47
48
|
- spec/outline_spec.rb
|
48
49
|
homepage: http://github.com/c00lryguy/outline
|
49
|
-
licenses:
|
50
|
+
licenses:
|
51
|
+
- MIT
|
50
52
|
post_install_message:
|
51
53
|
rdoc_options: []
|
52
54
|
require_paths:
|
@@ -57,18 +59,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
57
59
|
- - ! '>='
|
58
60
|
- !ruby/object:Gem::Version
|
59
61
|
version: '0'
|
60
|
-
segments:
|
61
|
-
- 0
|
62
|
-
hash: -3261779845905764895
|
63
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
63
|
none: false
|
65
64
|
requirements:
|
66
65
|
- - ! '>='
|
67
66
|
- !ruby/object:Gem::Version
|
68
67
|
version: '0'
|
69
|
-
segments:
|
70
|
-
- 0
|
71
|
-
hash: -3261779845905764895
|
72
68
|
requirements: []
|
73
69
|
rubyforge_project:
|
74
70
|
rubygems_version: 1.8.10
|
@@ -77,3 +73,4 @@ specification_version: 3
|
|
77
73
|
summary: Simplify your configurations.
|
78
74
|
test_files:
|
79
75
|
- spec/outline_spec.rb
|
76
|
+
has_rdoc:
|