uuids 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -0
- data/README.rdoc +32 -35
- data/Rakefile +13 -27
- data/app/models/uuids/uuid.rb +1 -0
- data/bin/uuids +13 -0
- data/lib/uuids/base/has_uuids.rb +3 -3
- data/lib/uuids/generators/install/migration.rb +62 -0
- data/lib/uuids/generators/install.rb +84 -0
- data/lib/uuids/version.rb +1 -1
- data/lib/uuids.rb +7 -5
- data/spec/dummy/Rakefile +17 -4
- data/spec/dummy/config/database.yml +8 -24
- data/spec/dummy/config/environment.rb +28 -4
- data/spec/dummy/config/initializers/application.rb +37 -0
- data/spec/dummy/config/initializers/dummy.rb +13 -0
- data/spec/dummy/config/initializers/seed_loader.rb +44 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/dummy.rb +16 -0
- data/spec/{dummy/spec/factories → factories}/records.rb +0 -0
- data/spec/{support/initializers → initializers}/database_cleaner.rb +0 -4
- data/spec/{support/initializers/factory_girl_rails.rb → initializers/factory_girl.rb} +1 -1
- data/spec/{support/initializers → initializers}/focus.rb +0 -0
- data/spec/{support/initializers → initializers}/garbage_collection.rb +0 -0
- data/spec/{support/initializers → initializers}/i18n.rb +1 -0
- data/spec/{support/initializers → initializers}/migrations.rb +0 -0
- data/spec/{support/initializers → initializers}/random_order.rb +0 -0
- data/spec/{support/initializers → initializers}/rspec.rb +0 -0
- data/spec/initializers/sandbox.rb +15 -0
- data/spec/spec_helper.rb +9 -9
- data/spec/support/capture.rb +16 -0
- data/spec/support/migrations.rb +16 -0
- data/spec/support/sandbox.rb +44 -0
- data/spec/uuids/cli/install_spec.rb +49 -0
- data/spec/{lib/uuids → uuids/lib}/base_spec.rb +0 -0
- data/spec/uuids/lib/generators/install/migration_spec.rb +41 -0
- data/spec/uuids/lib/generators/install_spec.rb +64 -0
- data/spec/{models/uuids → uuids/models}/uuid_spec.rb +0 -0
- metadata +96 -98
- data/lib/tasks/uuids/install.rake +0 -9
- data/lib/uuids/engine.rb +0 -12
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/app/assets/javascripts/application.js +0 -13
- data/spec/dummy/app/assets/stylesheets/application.css +0 -15
- data/spec/dummy/app/controllers/application_controller.rb +0 -5
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/views/layouts/application.html.erb +0 -13
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/config/application.rb +0 -29
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -37
- data/spec/dummy/config/environments/production.rb +0 -78
- data/spec/dummy/config/environments/test.rb +0 -39
- data/spec/dummy/config/initializers/assets.rb +0 -8
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -4
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -23
- data/spec/dummy/config/routes.rb +0 -4
- data/spec/dummy/config/secrets.yml +0 -22
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/log/development.log +0 -0
- data/spec/dummy/log/test.log +0 -2962
- data/spec/dummy/public/404.html +0 -67
- data/spec/dummy/public/422.html +0 -67
- data/spec/dummy/public/500.html +0 -66
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/support/initializers/coveralls.rb +0 -4
- data/spec/support/initializers/rails.rb +0 -6
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Defines `prepare_sandbox` and `clear_sandbox` methods.
|
2
|
+
require "support/sandbox"
|
3
|
+
|
4
|
+
RSpec.configure do |config|
|
5
|
+
|
6
|
+
# Clears a sandbox before corresponding spec.
|
7
|
+
config.before :each, :sandbox do
|
8
|
+
prepare_sandbox
|
9
|
+
end
|
10
|
+
|
11
|
+
# Clears a sandbox after corresponding spec.
|
12
|
+
config.after :each, :sandbox do
|
13
|
+
clear_sandbox
|
14
|
+
end
|
15
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
|
1
|
+
# Checks code
|
2
|
+
require "coveralls"
|
3
|
+
Coveralls.wear! "rails"
|
2
4
|
|
3
|
-
|
5
|
+
# Loads dummy application.
|
6
|
+
require_relative "dummy/lib/dummy"
|
4
7
|
|
5
|
-
#
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
Dir[File.join(spec, "support", "**", "*.rb")].each { |file| require file }
|
10
|
-
Dir[File.join(spec, "dummy", "spec", "factories", "*.rb")]
|
11
|
-
.each { |file| require file }
|
8
|
+
# Loads RSpec initializers and FactoryGirl factories.
|
9
|
+
%w(initializers factories).each do |dir|
|
10
|
+
Dir[File.expand_path("../#{ dir }/*.rb", __FILE__)].each { |f| require f }
|
11
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Captures given stream.
|
2
|
+
#
|
3
|
+
# @example
|
4
|
+
# capture(:stdout) { do_something }
|
5
|
+
#
|
6
|
+
def capture(stream)
|
7
|
+
begin
|
8
|
+
stream = stream.to_s
|
9
|
+
eval "$#{stream} = StringIO.new"
|
10
|
+
yield
|
11
|
+
result = eval("$#{stream}").string
|
12
|
+
ensure
|
13
|
+
eval("$#{stream} = #{stream.upcase}")
|
14
|
+
end
|
15
|
+
result
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Returns a list of all module's migrations.
|
2
|
+
def migrations
|
3
|
+
@migrations ||= begin
|
4
|
+
Dir[File.expand_path "../../../db/migrate/*.rb", __FILE__]
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
# Checks if a directory has a migration from given source file.
|
9
|
+
RSpec::Matchers.define :have_migration_from do |source|
|
10
|
+
match do |dir|
|
11
|
+
search = "#{ dir }/*#{ File.basename(source, ".rb")[14..-1] }.uuids.rb"
|
12
|
+
file = Dir[search].first
|
13
|
+
expect(file).not_to be_nil
|
14
|
+
expect(File.read file).to eq File.read source
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require_relative "capture"
|
2
|
+
|
3
|
+
# Path to the `tmp/sandbox`.
|
4
|
+
def sandbox
|
5
|
+
@sandbox ||= File.expand_path "../../../tmp/sandbox", __FILE__
|
6
|
+
end
|
7
|
+
|
8
|
+
# Clears `tmp/sandbox`.
|
9
|
+
def clear_sandbox
|
10
|
+
FileUtils.rm_rf sandbox
|
11
|
+
end
|
12
|
+
|
13
|
+
# Re-creates `spec/sandbox`.
|
14
|
+
def prepare_sandbox
|
15
|
+
clear_sandbox
|
16
|
+
FileUtils.mkdir_p sandbox
|
17
|
+
end
|
18
|
+
|
19
|
+
# Runs code from `sandbox`.
|
20
|
+
def try_in_sandbox
|
21
|
+
FileUtils.cd(sandbox) { capture(:stdout) { yield } }
|
22
|
+
end
|
23
|
+
|
24
|
+
# Runs cli from `sandbox`.
|
25
|
+
def run_in_sandbox(command)
|
26
|
+
result = ""
|
27
|
+
try_in_sandbox { result = `#{ command }` }
|
28
|
+
result
|
29
|
+
end
|
30
|
+
|
31
|
+
# Checks if a file with given name exists in the sandbox.
|
32
|
+
#
|
33
|
+
# @example
|
34
|
+
#
|
35
|
+
# it "adds file.rb", :sandbox do
|
36
|
+
# expect("file.rb").to present_in_sandbox
|
37
|
+
# end
|
38
|
+
#
|
39
|
+
RSpec::Matchers.define :present_in_sandbox do
|
40
|
+
match do |filename|
|
41
|
+
file = File.join(sandbox, filename)
|
42
|
+
expect(File.exist? file).to be_truthy
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require "spec_helper"
|
3
|
+
|
4
|
+
describe "$ uuids install", :sandbox do
|
5
|
+
|
6
|
+
let(:files_in_sandbox) { Dir["#{ sandbox }/**/*.*"] }
|
7
|
+
|
8
|
+
context "without options" do
|
9
|
+
|
10
|
+
let!(:dir) { "#{ sandbox }/db/migrate" }
|
11
|
+
before { run_in_sandbox "uuids install" }
|
12
|
+
|
13
|
+
it "copies migrations to 'db/migrate'" do
|
14
|
+
migrations.each { |file| expect(dir).to have_migration_from file }
|
15
|
+
end
|
16
|
+
|
17
|
+
it "doesn't add other files" do
|
18
|
+
expect(files_in_sandbox.count).to eq migrations.count
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
context "-d" do
|
23
|
+
|
24
|
+
let!(:dir) { "#{ sandbox }/spec/dummy/db/migrate" }
|
25
|
+
before { run_in_sandbox "uuids install -d" }
|
26
|
+
|
27
|
+
it "copies migrations to 'spec/dummy/db/migrate'" do
|
28
|
+
migrations.each { |file| expect(dir).to have_migration_from file }
|
29
|
+
end
|
30
|
+
|
31
|
+
it "doesn't add other files" do
|
32
|
+
expect(files_in_sandbox.count).to eq migrations.count
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
context "-f folder" do
|
37
|
+
|
38
|
+
let!(:dir) { "#{ sandbox }/folder/db/migrate" }
|
39
|
+
before { run_in_sandbox "uuids install -f folder" }
|
40
|
+
|
41
|
+
it "copies migrations to 'some_path/db/migrate'" do
|
42
|
+
migrations.each { |file| expect(dir).to have_migration_from file }
|
43
|
+
end
|
44
|
+
|
45
|
+
it "doesn't add other files" do
|
46
|
+
expect(files_in_sandbox.count).to eq migrations.count
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
File without changes
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require "spec_helper"
|
3
|
+
|
4
|
+
module Uuids
|
5
|
+
module Generators
|
6
|
+
class Install
|
7
|
+
describe Migration, :sandbox do
|
8
|
+
|
9
|
+
let(:filename) { "20140101010101_create_items_items" }
|
10
|
+
let(:filepath) { "#{ sandbox }/#{ filename }.rb" }
|
11
|
+
let(:content) { "some content" }
|
12
|
+
|
13
|
+
before { File.write filepath, content }
|
14
|
+
subject { Migration.new filepath }
|
15
|
+
|
16
|
+
describe "#source" do
|
17
|
+
|
18
|
+
it "returns migrations source" do
|
19
|
+
expect(subject.source).to eq filepath
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "#target" do
|
24
|
+
|
25
|
+
it "returns the name of migration target" do
|
26
|
+
target = subject.target
|
27
|
+
expect(target[0..13]).to match(/\d{14}/)
|
28
|
+
expect(target[14..-1]).to eq "#{ filename[14..-1] }.uuids.rb"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "#content" do
|
33
|
+
|
34
|
+
it "returns the migration content" do
|
35
|
+
expect(subject.content).to eq content
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require "spec_helper"
|
3
|
+
require "support/migrations"
|
4
|
+
|
5
|
+
module Uuids
|
6
|
+
module Generators
|
7
|
+
describe Install, :sandbox do
|
8
|
+
|
9
|
+
describe "#invoke_all" do
|
10
|
+
|
11
|
+
def run_with_options(options = {})
|
12
|
+
try_in_sandbox do
|
13
|
+
subject = Uuids::Generators::Install.new [], options
|
14
|
+
subject.invoke_all
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
let(:files_in_sandbox) { Dir["#{ sandbox }/**/*.*"] }
|
19
|
+
|
20
|
+
context "without options" do
|
21
|
+
|
22
|
+
let!(:dir) { "#{ sandbox }/db/migrate" }
|
23
|
+
before { run_with_options }
|
24
|
+
|
25
|
+
it "copies migrations to 'db/migrate'" do
|
26
|
+
migrations.each { |file| expect(dir).to have_migration_from file }
|
27
|
+
end
|
28
|
+
|
29
|
+
it "doesn't add other files" do
|
30
|
+
expect(files_in_sandbox.count).to eq migrations.count
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context "dummy: true" do
|
35
|
+
|
36
|
+
let!(:dir) { "#{ sandbox }/spec/dummy/db/migrate" }
|
37
|
+
before { run_with_options dummy: true }
|
38
|
+
|
39
|
+
it "copies migrations to 'spec/dummy/db/migrate'" do
|
40
|
+
migrations.each { |file| expect(dir).to have_migration_from file }
|
41
|
+
end
|
42
|
+
|
43
|
+
it "doesn't add other files" do
|
44
|
+
expect(files_in_sandbox.count).to eq migrations.count
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
context "folder: 'folder'" do
|
49
|
+
|
50
|
+
let!(:dir) { "#{ sandbox }/folder/db/migrate" }
|
51
|
+
before { run_with_options folder: "folder" }
|
52
|
+
|
53
|
+
it "copies migrations to 'some_path/db/migrate'" do
|
54
|
+
migrations.each { |file| expect(dir).to have_migration_from file }
|
55
|
+
end
|
56
|
+
|
57
|
+
it "doesn't add other files" do
|
58
|
+
expect(files_in_sandbox.count).to eq migrations.count
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
File without changes
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uuids
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kozin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
@@ -24,6 +24,34 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: i18n
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.6'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.6'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: thor
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: database_cleaner
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +67,7 @@ dependencies:
|
|
39
67
|
- !ruby/object:Gem::Version
|
40
68
|
version: '1.3'
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
70
|
+
name: factory_girl
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
44
72
|
requirements:
|
45
73
|
- - "~>"
|
@@ -81,7 +109,7 @@ dependencies:
|
|
81
109
|
- !ruby/object:Gem::Version
|
82
110
|
version: '4.11'
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
|
-
name: rspec
|
112
|
+
name: rspec
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
115
|
- - "~>"
|
@@ -122,10 +150,25 @@ dependencies:
|
|
122
150
|
- - "~>"
|
123
151
|
- !ruby/object:Gem::Version
|
124
152
|
version: '1.3'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rake
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '10.3'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '10.3'
|
125
167
|
description: AR model to store uuids assigned to various resources. It is expected
|
126
168
|
a resource can be identified by many UUIDs.
|
127
169
|
email: andrew.kozin@gmail.com
|
128
|
-
executables:
|
170
|
+
executables:
|
171
|
+
- uuids
|
129
172
|
extensions: []
|
130
173
|
extra_rdoc_files:
|
131
174
|
- LICENSE.rdoc
|
@@ -136,71 +179,49 @@ files:
|
|
136
179
|
- README.rdoc
|
137
180
|
- Rakefile
|
138
181
|
- app/models/uuids/uuid.rb
|
182
|
+
- bin/uuids
|
139
183
|
- config/locales/en.yml
|
140
184
|
- config/locales/ru.yml
|
141
185
|
- db/migrate/20141016112506_create_uuids_uuids.rb
|
142
|
-
- lib/tasks/uuids/install.rake
|
143
186
|
- lib/uuids.rb
|
144
187
|
- lib/uuids/base.rb
|
145
188
|
- lib/uuids/base/has_uuids.rb
|
146
|
-
- lib/uuids/
|
189
|
+
- lib/uuids/generators/install.rb
|
190
|
+
- lib/uuids/generators/install/migration.rb
|
147
191
|
- lib/uuids/version.rb
|
148
|
-
- spec/dummy/README.rdoc
|
149
192
|
- spec/dummy/Rakefile
|
150
|
-
- spec/dummy/app/assets/javascripts/application.js
|
151
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
152
|
-
- spec/dummy/app/controllers/application_controller.rb
|
153
|
-
- spec/dummy/app/helpers/application_helper.rb
|
154
193
|
- spec/dummy/app/models/city.rb
|
155
194
|
- spec/dummy/app/models/record.rb
|
156
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
157
|
-
- spec/dummy/bin/bundle
|
158
|
-
- spec/dummy/bin/rails
|
159
|
-
- spec/dummy/bin/rake
|
160
|
-
- spec/dummy/config.ru
|
161
|
-
- spec/dummy/config/application.rb
|
162
|
-
- spec/dummy/config/boot.rb
|
163
195
|
- spec/dummy/config/database.yml
|
164
196
|
- spec/dummy/config/environment.rb
|
165
|
-
- spec/dummy/config/
|
166
|
-
- spec/dummy/config/
|
167
|
-
- spec/dummy/config/
|
168
|
-
- spec/dummy/config/initializers/assets.rb
|
169
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
170
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
171
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
172
|
-
- spec/dummy/config/initializers/inflections.rb
|
173
|
-
- spec/dummy/config/initializers/mime_types.rb
|
174
|
-
- spec/dummy/config/initializers/session_store.rb
|
175
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
176
|
-
- spec/dummy/config/locales/en.yml
|
177
|
-
- spec/dummy/config/routes.rb
|
178
|
-
- spec/dummy/config/secrets.yml
|
197
|
+
- spec/dummy/config/initializers/application.rb
|
198
|
+
- spec/dummy/config/initializers/dummy.rb
|
199
|
+
- spec/dummy/config/initializers/seed_loader.rb
|
179
200
|
- spec/dummy/db/migrate/20141016113016_create_records.rb
|
180
201
|
- spec/dummy/db/migrate/20141017081115_create_cities.rb
|
181
202
|
- spec/dummy/db/schema.rb
|
182
203
|
- spec/dummy/db/test.sqlite3
|
183
|
-
- spec/dummy/
|
184
|
-
- spec/
|
185
|
-
- spec/dummy/public/404.html
|
186
|
-
- spec/dummy/public/422.html
|
187
|
-
- spec/dummy/public/500.html
|
188
|
-
- spec/dummy/public/favicon.ico
|
189
|
-
- spec/dummy/spec/factories/records.rb
|
204
|
+
- spec/dummy/lib/dummy.rb
|
205
|
+
- spec/factories/records.rb
|
190
206
|
- spec/factories/uuids.rb
|
191
|
-
- spec/
|
192
|
-
- spec/
|
207
|
+
- spec/initializers/database_cleaner.rb
|
208
|
+
- spec/initializers/factory_girl.rb
|
209
|
+
- spec/initializers/focus.rb
|
210
|
+
- spec/initializers/garbage_collection.rb
|
211
|
+
- spec/initializers/i18n.rb
|
212
|
+
- spec/initializers/migrations.rb
|
213
|
+
- spec/initializers/random_order.rb
|
214
|
+
- spec/initializers/rspec.rb
|
215
|
+
- spec/initializers/sandbox.rb
|
193
216
|
- spec/spec_helper.rb
|
194
|
-
- spec/support/
|
195
|
-
- spec/support/
|
196
|
-
- spec/support/
|
197
|
-
- spec/
|
198
|
-
- spec/
|
199
|
-
- spec/
|
200
|
-
- spec/
|
201
|
-
- spec/
|
202
|
-
- spec/support/initializers/random_order.rb
|
203
|
-
- spec/support/initializers/rspec.rb
|
217
|
+
- spec/support/capture.rb
|
218
|
+
- spec/support/migrations.rb
|
219
|
+
- spec/support/sandbox.rb
|
220
|
+
- spec/uuids/cli/install_spec.rb
|
221
|
+
- spec/uuids/lib/base_spec.rb
|
222
|
+
- spec/uuids/lib/generators/install/migration_spec.rb
|
223
|
+
- spec/uuids/lib/generators/install_spec.rb
|
224
|
+
- spec/uuids/models/uuid_spec.rb
|
204
225
|
homepage: https://github.com/nepalez/uuids
|
205
226
|
licenses:
|
206
227
|
- MIT
|
@@ -226,62 +247,39 @@ signing_key:
|
|
226
247
|
specification_version: 4
|
227
248
|
summary: UUIDs AR model.
|
228
249
|
test_files:
|
250
|
+
- spec/uuids/cli/install_spec.rb
|
251
|
+
- spec/uuids/models/uuid_spec.rb
|
252
|
+
- spec/uuids/lib/generators/install/migration_spec.rb
|
253
|
+
- spec/uuids/lib/generators/install_spec.rb
|
254
|
+
- spec/uuids/lib/base_spec.rb
|
229
255
|
- spec/spec_helper.rb
|
230
|
-
- spec/models/uuids/uuid_spec.rb
|
231
|
-
- spec/dummy/public/500.html
|
232
|
-
- spec/dummy/public/422.html
|
233
|
-
- spec/dummy/public/404.html
|
234
|
-
- spec/dummy/public/favicon.ico
|
235
|
-
- spec/dummy/config/secrets.yml
|
236
|
-
- spec/dummy/config/locales/en.yml
|
237
|
-
- spec/dummy/config/environments/test.rb
|
238
|
-
- spec/dummy/config/environments/development.rb
|
239
|
-
- spec/dummy/config/environments/production.rb
|
240
256
|
- spec/dummy/config/environment.rb
|
241
|
-
- spec/dummy/config/boot.rb
|
242
257
|
- spec/dummy/config/database.yml
|
243
|
-
- spec/dummy/config/
|
244
|
-
- spec/dummy/config/application.rb
|
245
|
-
- spec/dummy/config/initializers/
|
246
|
-
- spec/dummy/config/initializers/inflections.rb
|
247
|
-
- spec/dummy/config/initializers/session_store.rb
|
248
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
249
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
250
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
251
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
252
|
-
- spec/dummy/config/initializers/assets.rb
|
258
|
+
- spec/dummy/config/initializers/seed_loader.rb
|
259
|
+
- spec/dummy/config/initializers/application.rb
|
260
|
+
- spec/dummy/config/initializers/dummy.rb
|
253
261
|
- spec/dummy/db/migrate/20141017081115_create_cities.rb
|
254
262
|
- spec/dummy/db/migrate/20141016113016_create_records.rb
|
255
263
|
- spec/dummy/db/test.sqlite3
|
256
264
|
- spec/dummy/db/schema.rb
|
257
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
258
265
|
- spec/dummy/app/models/record.rb
|
259
266
|
- spec/dummy/app/models/city.rb
|
260
|
-
- spec/dummy/
|
261
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
262
|
-
- spec/dummy/app/helpers/application_helper.rb
|
263
|
-
- spec/dummy/app/controllers/application_controller.rb
|
267
|
+
- spec/dummy/lib/dummy.rb
|
264
268
|
- spec/dummy/Rakefile
|
265
|
-
- spec/dummy/spec/factories/records.rb
|
266
|
-
- spec/dummy/README.rdoc
|
267
|
-
- spec/dummy/log/development.log
|
268
|
-
- spec/dummy/log/test.log
|
269
|
-
- spec/dummy/config.ru
|
270
|
-
- spec/dummy/bin/rake
|
271
|
-
- spec/dummy/bin/rails
|
272
|
-
- spec/dummy/bin/bundle
|
273
|
-
- spec/lib/uuids/base_spec.rb
|
274
269
|
- spec/factories/uuids.rb
|
275
|
-
- spec/
|
276
|
-
- spec/
|
277
|
-
- spec/
|
278
|
-
- spec/
|
279
|
-
- spec/
|
280
|
-
- spec/
|
281
|
-
- spec/
|
282
|
-
- spec/
|
283
|
-
- spec/
|
284
|
-
- spec/
|
270
|
+
- spec/factories/records.rb
|
271
|
+
- spec/initializers/garbage_collection.rb
|
272
|
+
- spec/initializers/i18n.rb
|
273
|
+
- spec/initializers/factory_girl.rb
|
274
|
+
- spec/initializers/focus.rb
|
275
|
+
- spec/initializers/sandbox.rb
|
276
|
+
- spec/initializers/database_cleaner.rb
|
277
|
+
- spec/initializers/migrations.rb
|
278
|
+
- spec/initializers/random_order.rb
|
279
|
+
- spec/initializers/rspec.rb
|
280
|
+
- spec/support/capture.rb
|
281
|
+
- spec/support/sandbox.rb
|
282
|
+
- spec/support/migrations.rb
|
285
283
|
- Rakefile
|
286
284
|
- ".rubocop.yml"
|
287
285
|
has_rdoc:
|
@@ -1,9 +0,0 @@
|
|
1
|
-
namespace :uuids do
|
2
|
-
|
3
|
-
desc "Installs the uuids gem inside a Rails application or Rails engine."
|
4
|
-
task install: :environment do
|
5
|
-
app = Rake::Task.task_defined?("railties:install:migrations") ? "" : "app:"
|
6
|
-
Rake::Task["#{ app }railties:install:migrations"].reenable
|
7
|
-
system "rake #{ app }uuids:install:migrations"
|
8
|
-
end
|
9
|
-
end
|
data/lib/uuids/engine.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
module Uuids
|
2
|
-
|
3
|
-
# Rails Engine settings
|
4
|
-
class Engine < ::Rails::Engine
|
5
|
-
isolate_namespace Uuids
|
6
|
-
|
7
|
-
config.generators do |generator|
|
8
|
-
generator.test_framework :rspec, fixture: true, view_specs: true
|
9
|
-
generator.fixture_replacement :factory_girl, dir: "spec/factories"
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
data/spec/dummy/README.rdoc
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
== README
|
2
|
-
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
4
|
-
application up and running.
|
5
|
-
|
6
|
-
Things you may want to cover:
|
7
|
-
|
8
|
-
* Ruby version
|
9
|
-
|
10
|
-
* System dependencies
|
11
|
-
|
12
|
-
* Configuration
|
13
|
-
|
14
|
-
* Database creation
|
15
|
-
|
16
|
-
* Database initialization
|
17
|
-
|
18
|
-
* How to run the test suite
|
19
|
-
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
21
|
-
|
22
|
-
* Deployment instructions
|
23
|
-
|
24
|
-
* ...
|
25
|
-
|
26
|
-
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
28
|
-
<tt>rake doc:app</tt>.
|
@@ -1,13 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file.
|
9
|
-
//
|
10
|
-
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
-
// about supported directives.
|
12
|
-
//
|
13
|
-
//= require_tree .
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
-
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
-
* file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|