anonymous_active_record 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/Gemfile +2 -0
- data/Rakefile +2 -0
- data/anonymous_active_record.gemspec +6 -3
- data/bin/console +1 -0
- data/lib/anonymous_active_record.rb +2 -0
- data/lib/anonymous_active_record/factory.rb +2 -0
- data/lib/anonymous_active_record/generator.rb +3 -1
- data/lib/anonymous_active_record/version.rb +3 -1
- metadata +24 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4505db5d93ffbdacfffc19d27c14e1d98ca11a889660ff9587bea7590a99566
|
4
|
+
data.tar.gz: 9afc59dff158716e7e1b303ab5e59978813857869170c14f672106e81b291424
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16dfd759bc5c9ec9ca06c116585cf9a20c62d2991cf627315a369a4e6fabce2c671c8b360dd77ef38de80efa4581e46652fbd2535d17e2d2e67274a897e5209f
|
7
|
+
data.tar.gz: 0aaa90c93370fa1fab73b6c894f2eb0f00106706be3e772b490b8c2efc51533f132795b7b465890c7886b173a11db66d282e546f4ea02fe21aa7a5a31a751358
|
data/.rubocop.yml
ADDED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
lib = File.expand_path('lib', __dir__)
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
5
|
require 'anonymous_active_record/version'
|
@@ -22,12 +24,13 @@ Gem::Specification.new do |spec|
|
|
22
24
|
|
23
25
|
spec.required_ruby_version = '>= 2.4' # Requirement for Ruby String#capitalize
|
24
26
|
|
25
|
-
spec.add_development_dependency 'bundler'
|
27
|
+
spec.add_development_dependency 'bundler'
|
26
28
|
spec.add_development_dependency 'rake', '~> 12'
|
27
29
|
spec.add_development_dependency 'rspec', '~> 3'
|
28
30
|
spec.add_development_dependency 'rspec-block_is_expected', '~> 1.0'
|
29
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
30
|
-
spec.add_development_dependency 'rubocop-
|
31
|
+
spec.add_development_dependency 'rubocop', '~> 0.71'
|
32
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.3'
|
33
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 1.33'
|
31
34
|
spec.add_development_dependency 'sqlite3', '~> 1'
|
32
35
|
spec.add_dependency 'activerecord', '~> 5'
|
33
36
|
end
|
data/bin/console
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Usage:
|
2
4
|
#
|
3
5
|
# klass = AnonymousActiveRecord.generate(columns: ['name']) do
|
@@ -12,7 +14,7 @@
|
|
12
14
|
module AnonymousActiveRecord
|
13
15
|
# Generator defines a pseudo anonymous class in a particular namespace of your choosing.
|
14
16
|
class Generator
|
15
|
-
DEFAULT_NAME = 'anons'
|
17
|
+
DEFAULT_NAME = 'anons'
|
16
18
|
|
17
19
|
attr_reader :klass_namespaces, :table_name, :klass_name
|
18
20
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anonymous_active_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Boling
|
@@ -14,16 +14,16 @@ dependencies:
|
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,28 +72,42 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0.
|
75
|
+
version: '0.71'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.71'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop-performance
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.3'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
96
|
+
version: '1.3'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: rubocop-rspec
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '1.
|
103
|
+
version: '1.33'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: '1.
|
110
|
+
version: '1.33'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: sqlite3
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,6 +145,7 @@ extra_rdoc_files: []
|
|
131
145
|
files:
|
132
146
|
- ".gitignore"
|
133
147
|
- ".rspec"
|
148
|
+
- ".rubocop.yml"
|
134
149
|
- ".travis.yml"
|
135
150
|
- CODE_OF_CONDUCT.md
|
136
151
|
- Gemfile
|