flexmls_gems 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.bundle/config +3 -0
- data/.gitignore +1 -0
- data/.rvmrc +1 -0
- data/VERSION +1 -1
- data/lib/flexmls_gems.rb +4 -5
- data/lib/flexmls_gems/task_helper.rb +33 -2
- data/lib/flexmls_gems/tasks/test_unit.rb +16 -0
- data/lib/flexmls_gems/version.rb +7 -1
- data/lib/flexmls_gems/version_helper.rb +7 -1
- metadata +22 -20
- data/Gemfile.lock +0 -37
data/.bundle/config
ADDED
data/.gitignore
CHANGED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm ree-1.8.7-2011.03
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
data/lib/flexmls_gems.rb
CHANGED
@@ -1,8 +1,7 @@
|
|
1
|
-
require "flexmls_gems/version"
|
2
|
-
require "flexmls_gems/version_helper"
|
3
|
-
require "flexmls_gems/git_helper"
|
4
|
-
require "flexmls_gems/task_helper"
|
5
1
|
|
6
2
|
module FlexmlsGems
|
7
|
-
|
3
|
+
require "flexmls_gems/version"
|
4
|
+
require "flexmls_gems/version_helper"
|
5
|
+
require "flexmls_gems/git_helper"
|
6
|
+
require "flexmls_gems/task_helper"
|
8
7
|
end
|
@@ -4,7 +4,7 @@ module FlexmlsGems
|
|
4
4
|
class TaskHelper
|
5
5
|
include Rake::DSL if defined? Rake::DSL
|
6
6
|
|
7
|
-
attr_reader :pwd, :gemspec, :name, :version, :release_dir
|
7
|
+
attr_reader :pwd, :gemspec, :name, :version, :release_dir, :dev_release_dir
|
8
8
|
|
9
9
|
def initialize(opts={})
|
10
10
|
@pwd = opts[:dir] || Dir.pwd
|
@@ -12,8 +12,21 @@ module FlexmlsGems
|
|
12
12
|
raise("FlexmlsGems expects one and only one gemspec in the root of the project.") unless gemspecs.size == 1
|
13
13
|
@gemspec = gemspecs.first
|
14
14
|
@name = opts[:name] || File.basename(gemspec, '.gemspec')
|
15
|
-
|
15
|
+
begin
|
16
|
+
@version = Gem::Specification::load(gemspec).version
|
17
|
+
rescue
|
18
|
+
$stdout.puts "The version could not be determined from the gemspec. Defaulting to 0.0.0"
|
19
|
+
@version = DEFAULT_VERSION
|
20
|
+
end
|
16
21
|
@release_dir = opts[:release] || '/opt/gems/dev'
|
22
|
+
@dev_release_dir = opts[:dev_release] || '/opt/gems/dev'
|
23
|
+
end
|
24
|
+
|
25
|
+
def patch_version
|
26
|
+
if version.to_s =~ /^(\d+\.\d+\.\d+).*/
|
27
|
+
return $1
|
28
|
+
end
|
29
|
+
version
|
17
30
|
end
|
18
31
|
|
19
32
|
def setup
|
@@ -26,6 +39,14 @@ module FlexmlsGems
|
|
26
39
|
i=Gem::Indexer.new release_dir
|
27
40
|
i.generate_index
|
28
41
|
end
|
42
|
+
desc "Release a developement build of the gem"
|
43
|
+
task :dev_release do
|
44
|
+
gems = Dir[File.join("#{pwd}/pkg", "#{name}-#{version}.gem")]
|
45
|
+
raise "No gems built, run rake build to create" if gems.empty?
|
46
|
+
FileUtils.cp gems, "#{dev_release_dir}/gems"
|
47
|
+
i=Gem::Indexer.new dev_release_dir
|
48
|
+
i.generate_index
|
49
|
+
end
|
29
50
|
end
|
30
51
|
namespace :version do
|
31
52
|
namespace :bump do
|
@@ -47,6 +68,16 @@ module FlexmlsGems
|
|
47
68
|
git_helper.commit_version
|
48
69
|
$stdout.puts "Updated version to #{version_helper}"
|
49
70
|
end
|
71
|
+
desc "Bump the patch version to [#{patch_version}.pre] or [#{patch_version}.$BUILD]. Set BUILD=tagname in the environment to customize."
|
72
|
+
task :build => [:version] do
|
73
|
+
if ENV["BUILD"]
|
74
|
+
version_helper.bump_build(ENV["BUILD"]).save
|
75
|
+
else
|
76
|
+
version_helper.bump_build.save
|
77
|
+
end
|
78
|
+
git_helper.commit_version
|
79
|
+
$stdout.puts "Updated version to #{version_helper}"
|
80
|
+
end
|
50
81
|
end
|
51
82
|
end
|
52
83
|
task :version do
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'rake/testtask'
|
2
|
+
require 'ci/reporter/rake/test_unit'
|
3
|
+
require 'rcov/rcovtask'
|
4
|
+
|
5
|
+
Rake::TestTask.new(:test) do |test|
|
6
|
+
test.libs << 'lib' << 'test'
|
7
|
+
test.pattern = 'test/**/test_*.rb'
|
8
|
+
test.verbose = true
|
9
|
+
end
|
10
|
+
|
11
|
+
Rcov::RcovTask.new do |test|
|
12
|
+
test.libs << 'test'
|
13
|
+
test.pattern = 'test/**/test_*.rb'
|
14
|
+
test.verbose = true
|
15
|
+
test.rcov_opts << '--exclude "gems/*"'
|
16
|
+
end
|
data/lib/flexmls_gems/version.rb
CHANGED
@@ -1,3 +1,9 @@
|
|
1
1
|
module FlexmlsGems
|
2
|
-
|
2
|
+
DEFAULT_VERSION = "0.0.0"
|
3
|
+
def self.gem_version
|
4
|
+
File.read(File.dirname(__FILE__) + "/../../VERSION").chomp
|
5
|
+
rescue
|
6
|
+
DEFAULT_VERSION
|
7
|
+
end
|
8
|
+
VERSION = gem_version
|
3
9
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
|
2
2
|
module FlexmlsGems
|
3
3
|
class VersionHelper
|
4
|
-
|
5
4
|
def initialize(pwd=Dir.pwd)
|
6
5
|
@pwd = pwd
|
7
6
|
reset
|
@@ -11,6 +10,8 @@ module FlexmlsGems
|
|
11
10
|
|
12
11
|
def load
|
13
12
|
parse(File.read(path))
|
13
|
+
rescue
|
14
|
+
reset
|
14
15
|
end
|
15
16
|
|
16
17
|
def parse(string)
|
@@ -44,6 +45,11 @@ module FlexmlsGems
|
|
44
45
|
@build = nil
|
45
46
|
self
|
46
47
|
end
|
48
|
+
|
49
|
+
def bump_build(tag="pre")
|
50
|
+
@build = tag
|
51
|
+
self
|
52
|
+
end
|
47
53
|
|
48
54
|
def reset(major=0, minor=0, patch=0, build=nil)
|
49
55
|
@major = major
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flexmls_gems
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 3
|
10
|
+
version: 0.2.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Wade McEwen
|
@@ -15,13 +15,12 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-09-09 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: grit
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
23
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
25
24
|
none: false
|
26
25
|
requirements:
|
27
26
|
- - ~>
|
@@ -32,12 +31,12 @@ dependencies:
|
|
32
31
|
- 4
|
33
32
|
- 1
|
34
33
|
version: 2.4.1
|
34
|
+
prerelease: false
|
35
35
|
type: :runtime
|
36
|
-
|
36
|
+
requirement: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: rake
|
39
|
-
|
40
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
41
40
|
none: false
|
42
41
|
requirements:
|
43
42
|
- - ">="
|
@@ -46,12 +45,12 @@ dependencies:
|
|
46
45
|
segments:
|
47
46
|
- 0
|
48
47
|
version: "0"
|
48
|
+
prerelease: false
|
49
49
|
type: :development
|
50
|
-
|
50
|
+
requirement: *id002
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
52
|
name: rspec
|
53
|
-
|
54
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
55
54
|
none: false
|
56
55
|
requirements:
|
57
56
|
- - ~>
|
@@ -62,12 +61,12 @@ dependencies:
|
|
62
61
|
- 3
|
63
62
|
- 0
|
64
63
|
version: 2.3.0
|
64
|
+
prerelease: false
|
65
65
|
type: :development
|
66
|
-
|
66
|
+
requirement: *id003
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: ci_reporter
|
69
|
-
|
70
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
69
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
71
70
|
none: false
|
72
71
|
requirements:
|
73
72
|
- - ~>
|
@@ -78,12 +77,12 @@ dependencies:
|
|
78
77
|
- 6
|
79
78
|
- 3
|
80
79
|
version: 1.6.3
|
80
|
+
prerelease: false
|
81
81
|
type: :development
|
82
|
-
|
82
|
+
requirement: *id004
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rcov
|
85
|
-
|
86
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
85
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
87
86
|
none: false
|
88
87
|
requirements:
|
89
88
|
- - ~>
|
@@ -94,8 +93,9 @@ dependencies:
|
|
94
93
|
- 9
|
95
94
|
- 9
|
96
95
|
version: 0.9.9
|
96
|
+
prerelease: false
|
97
97
|
type: :development
|
98
|
-
|
98
|
+
requirement: *id005
|
99
99
|
description: This gem is set of tasks to aid gems and tasks that largely reflect a gem run with bundler
|
100
100
|
email:
|
101
101
|
- wade@fbsdata.com
|
@@ -106,9 +106,10 @@ extensions: []
|
|
106
106
|
extra_rdoc_files: []
|
107
107
|
|
108
108
|
files:
|
109
|
+
- .bundle/config
|
109
110
|
- .gitignore
|
111
|
+
- .rvmrc
|
110
112
|
- Gemfile
|
111
|
-
- Gemfile.lock
|
112
113
|
- LICENSE
|
113
114
|
- README.md
|
114
115
|
- Rakefile
|
@@ -121,6 +122,7 @@ files:
|
|
121
122
|
- lib/flexmls_gems/tasks/gems.rb
|
122
123
|
- lib/flexmls_gems/tasks/rdoc.rb
|
123
124
|
- lib/flexmls_gems/tasks/spec.rb
|
125
|
+
- lib/flexmls_gems/tasks/test_unit.rb
|
124
126
|
- lib/flexmls_gems/version.rb
|
125
127
|
- lib/flexmls_gems/version_helper.rb
|
126
128
|
- spec/git_helper_spec.rb
|
data/Gemfile.lock
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
flexmls_gems (0.2.0)
|
5
|
-
grit (~> 2.4.1)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: http://rubygems.org/
|
9
|
-
specs:
|
10
|
-
builder (2.1.2)
|
11
|
-
ci_reporter (1.6.5)
|
12
|
-
builder (>= 2.1.2)
|
13
|
-
diff-lcs (1.1.2)
|
14
|
-
grit (2.4.1)
|
15
|
-
diff-lcs (~> 1.1)
|
16
|
-
mime-types (~> 1.15)
|
17
|
-
mime-types (1.16)
|
18
|
-
rake (0.9.2)
|
19
|
-
rcov (0.9.9)
|
20
|
-
rspec (2.3.0)
|
21
|
-
rspec-core (~> 2.3.0)
|
22
|
-
rspec-expectations (~> 2.3.0)
|
23
|
-
rspec-mocks (~> 2.3.0)
|
24
|
-
rspec-core (2.3.1)
|
25
|
-
rspec-expectations (2.3.0)
|
26
|
-
diff-lcs (~> 1.1.2)
|
27
|
-
rspec-mocks (2.3.0)
|
28
|
-
|
29
|
-
PLATFORMS
|
30
|
-
ruby
|
31
|
-
|
32
|
-
DEPENDENCIES
|
33
|
-
ci_reporter (~> 1.6.3)
|
34
|
-
flexmls_gems!
|
35
|
-
rake
|
36
|
-
rcov (~> 0.9.9)
|
37
|
-
rspec (~> 2.3.0)
|