rails_artifactor 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rails_artifactor.rb +0 -1
- data/lib/rails_artifactor/artifact/file_name/artifacts.rb +1 -1
- data/lib/rails_artifactor/rspec/configure.rb +1 -2
- data/rails_artifactor.gemspec +2 -7
- metadata +17 -22
- data/lib/rails_artifactor/artifact/file_name/migration.rb +0 -54
- data/lib/rails_artifactor/artifact/migration.rb +0 -11
- data/lib/rails_artifactor/macro.rb +0 -2
- data/spec/rails_artifactor/artifact/migration_spec.rb +0 -0
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.6
|
data/lib/rails_artifactor.rb
CHANGED
data/rails_artifactor.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rails_artifactor}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = [%q{Kristian Mandrup}]
|
12
|
-
s.date = %q{2011-05-
|
12
|
+
s.date = %q{2011-05-16}
|
13
13
|
s.description = %q{Helpers for handling Rails 3 artifacts in general, such as CRUD operations etc.}
|
14
14
|
s.email = %q{kmandrup@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -35,10 +35,8 @@ Gem::Specification.new do |s|
|
|
35
35
|
"lib/rails_artifactor/artifact/crud/read.rb",
|
36
36
|
"lib/rails_artifactor/artifact/crud/update.rb",
|
37
37
|
"lib/rails_artifactor/artifact/file_name/artifacts.rb",
|
38
|
-
"lib/rails_artifactor/artifact/file_name/migration.rb",
|
39
38
|
"lib/rails_artifactor/artifact/file_name/view.rb",
|
40
39
|
"lib/rails_artifactor/artifact/markers.rb",
|
41
|
-
"lib/rails_artifactor/artifact/migration.rb",
|
42
40
|
"lib/rails_artifactor/artifact/orm.rb",
|
43
41
|
"lib/rails_artifactor/artifact/orm/active_record.rb",
|
44
42
|
"lib/rails_artifactor/artifact/orm/data_mapper.rb",
|
@@ -53,7 +51,6 @@ Gem::Specification.new do |s|
|
|
53
51
|
"lib/rails_artifactor/base/crud/read.rb",
|
54
52
|
"lib/rails_artifactor/base/crud/update.rb",
|
55
53
|
"lib/rails_artifactor/base/file_name.rb",
|
56
|
-
"lib/rails_artifactor/macro.rb",
|
57
54
|
"lib/rails_artifactor/namespaces.rb",
|
58
55
|
"lib/rails_artifactor/rspec.rb",
|
59
56
|
"lib/rails_artifactor/rspec/configure.rb",
|
@@ -83,7 +80,6 @@ Gem::Specification.new do |s|
|
|
83
80
|
"spec/rails_artifactor/artifact/file_name/migration_spec.rb",
|
84
81
|
"spec/rails_artifactor/artifact/file_name/view_spec.rb",
|
85
82
|
"spec/rails_artifactor/artifact/markers_spec.rb",
|
86
|
-
"spec/rails_artifactor/artifact/migration_spec.rb",
|
87
83
|
"spec/rails_artifactor/artifact/orm/active_record_spec.rb",
|
88
84
|
"spec/rails_artifactor/artifact/orm/data_mapper_spec.rb",
|
89
85
|
"spec/rails_artifactor/artifact/orm/mongo_mapper_spec.rb",
|
@@ -117,7 +113,6 @@ Gem::Specification.new do |s|
|
|
117
113
|
"spec/rails_artifactor/artifact/file_name/migration_spec.rb",
|
118
114
|
"spec/rails_artifactor/artifact/file_name/view_spec.rb",
|
119
115
|
"spec/rails_artifactor/artifact/markers_spec.rb",
|
120
|
-
"spec/rails_artifactor/artifact/migration_spec.rb",
|
121
116
|
"spec/rails_artifactor/artifact/orm/active_record_spec.rb",
|
122
117
|
"spec/rails_artifactor/artifact/orm/data_mapper_spec.rb",
|
123
118
|
"spec/rails_artifactor/artifact/orm/mongo_mapper_spec.rb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_artifactor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-05-
|
12
|
+
date: 2011-05-16 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &2161106020 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.3.0
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2161106020
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &2161104460 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.0.0
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2161104460
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: jeweler
|
38
|
-
requirement: &
|
38
|
+
requirement: &2161102780 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.5.2
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2161102780
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rcov
|
49
|
-
requirement: &
|
49
|
+
requirement: &2161096460 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2161096460
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: generator-spec
|
60
|
-
requirement: &
|
60
|
+
requirement: &2161094540 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.7.3
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2161094540
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: sugar-high
|
71
|
-
requirement: &
|
71
|
+
requirement: &2161093480 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 0.4.0
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2161093480
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: rails_assist
|
82
|
-
requirement: &
|
82
|
+
requirement: &2161092260 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: 0.4.1
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2161092260
|
91
91
|
description: Helpers for handling Rails 3 artifacts in general, such as CRUD operations
|
92
92
|
etc.
|
93
93
|
email: kmandrup@gmail.com
|
@@ -115,10 +115,8 @@ files:
|
|
115
115
|
- lib/rails_artifactor/artifact/crud/read.rb
|
116
116
|
- lib/rails_artifactor/artifact/crud/update.rb
|
117
117
|
- lib/rails_artifactor/artifact/file_name/artifacts.rb
|
118
|
-
- lib/rails_artifactor/artifact/file_name/migration.rb
|
119
118
|
- lib/rails_artifactor/artifact/file_name/view.rb
|
120
119
|
- lib/rails_artifactor/artifact/markers.rb
|
121
|
-
- lib/rails_artifactor/artifact/migration.rb
|
122
120
|
- lib/rails_artifactor/artifact/orm.rb
|
123
121
|
- lib/rails_artifactor/artifact/orm/active_record.rb
|
124
122
|
- lib/rails_artifactor/artifact/orm/data_mapper.rb
|
@@ -133,7 +131,6 @@ files:
|
|
133
131
|
- lib/rails_artifactor/base/crud/read.rb
|
134
132
|
- lib/rails_artifactor/base/crud/update.rb
|
135
133
|
- lib/rails_artifactor/base/file_name.rb
|
136
|
-
- lib/rails_artifactor/macro.rb
|
137
134
|
- lib/rails_artifactor/namespaces.rb
|
138
135
|
- lib/rails_artifactor/rspec.rb
|
139
136
|
- lib/rails_artifactor/rspec/configure.rb
|
@@ -163,7 +160,6 @@ files:
|
|
163
160
|
- spec/rails_artifactor/artifact/file_name/migration_spec.rb
|
164
161
|
- spec/rails_artifactor/artifact/file_name/view_spec.rb
|
165
162
|
- spec/rails_artifactor/artifact/markers_spec.rb
|
166
|
-
- spec/rails_artifactor/artifact/migration_spec.rb
|
167
163
|
- spec/rails_artifactor/artifact/orm/active_record_spec.rb
|
168
164
|
- spec/rails_artifactor/artifact/orm/data_mapper_spec.rb
|
169
165
|
- spec/rails_artifactor/artifact/orm/mongo_mapper_spec.rb
|
@@ -189,7 +185,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
189
185
|
version: '0'
|
190
186
|
segments:
|
191
187
|
- 0
|
192
|
-
hash:
|
188
|
+
hash: 2238898544022906389
|
193
189
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
194
190
|
none: false
|
195
191
|
requirements:
|
@@ -219,7 +215,6 @@ test_files:
|
|
219
215
|
- spec/rails_artifactor/artifact/file_name/migration_spec.rb
|
220
216
|
- spec/rails_artifactor/artifact/file_name/view_spec.rb
|
221
217
|
- spec/rails_artifactor/artifact/markers_spec.rb
|
222
|
-
- spec/rails_artifactor/artifact/migration_spec.rb
|
223
218
|
- spec/rails_artifactor/artifact/orm/active_record_spec.rb
|
224
219
|
- spec/rails_artifactor/artifact/orm/data_mapper_spec.rb
|
225
220
|
- spec/rails_artifactor/artifact/orm/mongo_mapper_spec.rb
|
@@ -1,54 +0,0 @@
|
|
1
|
-
require 'migration_assist'
|
2
|
-
require 'sugar-high/regexp'
|
3
|
-
|
4
|
-
module RailsAssist::Artifact
|
5
|
-
module Migration
|
6
|
-
module FileName
|
7
|
-
include ::RailsAssist::Migration::ClassMethods
|
8
|
-
|
9
|
-
DIR = RailsAssist::Artifact::Directory
|
10
|
-
|
11
|
-
class FindError
|
12
|
-
attr_accessor :find_expr
|
13
|
-
|
14
|
-
def initialize find_expr
|
15
|
-
self.find_expr = find_expr
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def migration_file_name name, options={}
|
20
|
-
number = options[:number]
|
21
|
-
|
22
|
-
migration_dir_name = File.expand_path(DIR.migration_dir(options))
|
23
|
-
|
24
|
-
number = next_migration_number(migration_dir_name) if !number
|
25
|
-
File.join(migration_dir_name, "#{number}_#{name}.rb")
|
26
|
-
end
|
27
|
-
|
28
|
-
def find_migration name, options={}
|
29
|
-
root_path = options[:root_path]
|
30
|
-
|
31
|
-
migration_dir_name = File.expand_path(DIR.migration_dir options)
|
32
|
-
|
33
|
-
migration_find_expr = "#{migration_dir_name}/[0-9]*_*.rb"
|
34
|
-
migrations = Dir.glob(migration_find_expr)
|
35
|
-
|
36
|
-
find_err = FindError.new migration_find_expr
|
37
|
-
|
38
|
-
return find_err if migrations.empty?
|
39
|
-
|
40
|
-
migration_find_expr = /\d+_#{name}\.rb$/
|
41
|
-
find_err.find_expr = migration_find_expr
|
42
|
-
|
43
|
-
matching_migrations = migrations.grep_it(migration_find_expr)
|
44
|
-
|
45
|
-
return find_err if matching_migrations.empty?
|
46
|
-
|
47
|
-
migration_file = (options[:last]) ? matching_migrations.last : matching_migrations.first
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
include FileName
|
52
|
-
extend FileName
|
53
|
-
end
|
54
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
require 'migration_assist'
|
2
|
-
|
3
|
-
RailsAssist::Migration.rails_root_dir = RailsAssist::Directory.rails_root
|
4
|
-
|
5
|
-
module RailsAssist::Artifact
|
6
|
-
module Migration
|
7
|
-
include RailsAssist::BaseHelper
|
8
|
-
include RailsAssist::Migration::ClassMethods
|
9
|
-
include RailsAssist::Artifact::FileName
|
10
|
-
end
|
11
|
-
end
|
File without changes
|