mappd 5.2.3 → 6.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ef9b0668abea5a6c1b191bf2ae937774de9e7cfc9ed833139d3d765cdedd948
4
- data.tar.gz: 017716c3d843b3b4e5368300d08edf88bdbd58aaa5ccea07c289f98224fbf375
3
+ metadata.gz: dc73b8ea3568192b6e70be82508e5c11db491912b23e6110273619949f79b93e
4
+ data.tar.gz: 5d78060790e3527c9ef222c72107750e21727bc1bb08d5009720926fb9c0370e
5
5
  SHA512:
6
- metadata.gz: 509f2c8f4ae2e6d03a034d3e1383d8daecf3aaf87cab4a0c0332c38395646ca83c526f695f4d1c1bd8b88ad109d8175a90b20ba1696abdba1001568d6293981f
7
- data.tar.gz: 2c8d5860cfe0cd5fef2642f51c44e555c3d43d35c01f73f86cc0a3ead1cacb80021524ae6a5acdc134bf72ecabac30ed8c5d026c9f3615b23cc968c344ec9972
6
+ metadata.gz: cdc20d5a92cfb757476a7d5b3b2548d9cea15d7fa99e3b239d32e59ad6bcfac604338a7a417c4d5c39bd5a28bb9873370203e68de6efb44913e2e79a3dce2b57
7
+ data.tar.gz: 7d5328b2981937bac82f4e4413b0fc785eb104eb4a7f0b745592696203b80f46d97b77ffb6d01b287989dd0a730fbf19646508ca884638b9b28aca75fdb6fc7d
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.5
2
+ TargetRubyVersion: 2.6
3
3
  Exclude:
4
4
  - 'Guardfile'
5
5
  Style/Documentation:
data/.travis.yml CHANGED
@@ -2,6 +2,8 @@ language: ruby
2
2
  rvm:
3
3
  - 2.5
4
4
  install:
5
+ - gem install bundler
6
+ - bundle update --bundler
5
7
  - bundle install
6
8
  script:
7
9
  - bundle exec rubocop
data/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM ruby:2.5-slim
1
+ FROM ruby:2.6-slim
2
2
  MAINTAINER dan@paz.am
3
3
  ENV REFRESHED_AT 2018-05-14
4
4
 
data/Gemfile CHANGED
@@ -1,8 +1,8 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'activerecord', '>= 5.2.3'
3
+ gem 'activerecord', '>= 6.1.4'
4
4
  gem 'rake'
5
- gem 'sqlite3', '~> 1.3.6'
5
+ gem 'sqlite3', '~> 1.4.0'
6
6
 
7
7
  group :development do
8
8
  gem 'byebug'
data/Gemfile.lock CHANGED
@@ -1,32 +1,31 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mappd (5.2.3)
5
- activerecord (>= 5.2.3)
4
+ mappd (6.1.4)
5
+ activerecord (>= 6.0.3)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- activemodel (5.2.3)
11
- activesupport (= 5.2.3)
12
- activerecord (5.2.3)
13
- activemodel (= 5.2.3)
14
- activesupport (= 5.2.3)
15
- arel (>= 9.0)
16
- activesupport (5.2.3)
10
+ activemodel (6.1.4)
11
+ activesupport (= 6.1.4)
12
+ activerecord (6.1.4)
13
+ activemodel (= 6.1.4)
14
+ activesupport (= 6.1.4)
15
+ activesupport (6.1.4)
17
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
- i18n (>= 0.7, < 2)
19
- minitest (~> 5.1)
20
- tzinfo (~> 1.1)
21
- arel (9.0.0)
22
- ast (2.4.0)
23
- byebug (11.0.1)
24
- coderay (1.1.2)
25
- concurrent-ruby (1.1.5)
26
- diff-lcs (1.3)
27
- ffi (1.10.0)
28
- formatador (0.2.5)
29
- guard (2.15.0)
17
+ i18n (>= 1.6, < 2)
18
+ minitest (>= 5.1)
19
+ tzinfo (~> 2.0)
20
+ zeitwerk (~> 2.3)
21
+ ast (2.4.2)
22
+ byebug (11.1.3)
23
+ coderay (1.1.3)
24
+ concurrent-ruby (1.1.9)
25
+ diff-lcs (1.4.4)
26
+ ffi (1.15.3)
27
+ formatador (0.3.0)
28
+ guard (2.17.0)
30
29
  formatador (>= 0.2.4)
31
30
  listen (>= 2.7, < 4.0)
32
31
  lumberjack (>= 1.0.12, < 2.0)
@@ -40,73 +39,74 @@ GEM
40
39
  guard (~> 2.1)
41
40
  guard-compat (~> 1.1)
42
41
  rspec (>= 2.99.0, < 4.0)
43
- guard-rubocop (1.3.0)
42
+ guard-rubocop (1.4.0)
44
43
  guard (~> 2.0)
45
- rubocop (~> 0.20)
46
- i18n (1.6.0)
44
+ rubocop (< 2.0)
45
+ i18n (1.8.10)
47
46
  concurrent-ruby (~> 1.0)
48
- jaro_winkler (1.5.2)
49
- listen (3.1.5)
50
- rb-fsevent (~> 0.9, >= 0.9.4)
51
- rb-inotify (~> 0.9, >= 0.9.7)
52
- ruby_dep (~> 1.2)
53
- lumberjack (1.0.13)
54
- method_source (0.9.2)
55
- minitest (5.11.3)
47
+ listen (3.5.1)
48
+ rb-fsevent (~> 0.10, >= 0.10.3)
49
+ rb-inotify (~> 0.9, >= 0.9.10)
50
+ lumberjack (1.2.8)
51
+ method_source (1.0.0)
52
+ minitest (5.14.4)
56
53
  nenv (0.3.0)
57
- notiffany (0.1.1)
54
+ notiffany (0.1.3)
58
55
  nenv (~> 0.1)
59
56
  shellany (~> 0.0)
60
- parallel (1.17.0)
61
- parser (2.6.2.1)
62
- ast (~> 2.4.0)
63
- pry (0.12.2)
64
- coderay (~> 1.1.0)
65
- method_source (~> 0.9.0)
66
- psych (3.1.0)
57
+ parallel (1.20.1)
58
+ parser (3.0.2.0)
59
+ ast (~> 2.4.1)
60
+ pry (0.14.1)
61
+ coderay (~> 1.1)
62
+ method_source (~> 1.0)
67
63
  rainbow (3.0.0)
68
- rake (12.3.2)
69
- rb-fsevent (0.10.3)
70
- rb-inotify (0.10.0)
64
+ rake (13.0.6)
65
+ rb-fsevent (0.11.0)
66
+ rb-inotify (0.10.1)
71
67
  ffi (~> 1.0)
72
- rspec (3.8.0)
73
- rspec-core (~> 3.8.0)
74
- rspec-expectations (~> 3.8.0)
75
- rspec-mocks (~> 3.8.0)
76
- rspec-core (3.8.0)
77
- rspec-support (~> 3.8.0)
78
- rspec-expectations (3.8.2)
68
+ regexp_parser (2.1.1)
69
+ rexml (3.2.5)
70
+ rspec (3.10.0)
71
+ rspec-core (~> 3.10.0)
72
+ rspec-expectations (~> 3.10.0)
73
+ rspec-mocks (~> 3.10.0)
74
+ rspec-core (3.10.1)
75
+ rspec-support (~> 3.10.0)
76
+ rspec-expectations (3.10.1)
79
77
  diff-lcs (>= 1.2.0, < 2.0)
80
- rspec-support (~> 3.8.0)
81
- rspec-mocks (3.8.0)
78
+ rspec-support (~> 3.10.0)
79
+ rspec-mocks (3.10.2)
82
80
  diff-lcs (>= 1.2.0, < 2.0)
83
- rspec-support (~> 3.8.0)
84
- rspec-support (3.8.0)
85
- rubocop (0.67.2)
86
- jaro_winkler (~> 1.5.1)
81
+ rspec-support (~> 3.10.0)
82
+ rspec-support (3.10.2)
83
+ rubocop (1.18.3)
87
84
  parallel (~> 1.10)
88
- parser (>= 2.5, != 2.5.1.1)
89
- psych (>= 3.1.0)
85
+ parser (>= 3.0.0.0)
90
86
  rainbow (>= 2.2.2, < 4.0)
87
+ regexp_parser (>= 1.8, < 3.0)
88
+ rexml
89
+ rubocop-ast (>= 1.7.0, < 2.0)
91
90
  ruby-progressbar (~> 1.7)
92
- unicode-display_width (>= 1.4.0, < 1.6)
93
- ruby-progressbar (1.10.0)
94
- ruby_dep (1.5.0)
91
+ unicode-display_width (>= 1.4.0, < 3.0)
92
+ rubocop-ast (1.7.0)
93
+ parser (>= 3.0.1.1)
94
+ ruby-progressbar (1.11.0)
95
95
  shellany (0.0.1)
96
- shoulda-matchers (4.0.1)
97
- activesupport (>= 4.2.0)
98
- sqlite3 (1.3.13)
99
- thor (0.20.3)
100
- thread_safe (0.3.6)
101
- tzinfo (1.2.5)
102
- thread_safe (~> 0.1)
103
- unicode-display_width (1.5.0)
96
+ shoulda-matchers (5.0.0)
97
+ activesupport (>= 5.2.0)
98
+ sqlite3 (1.4.2)
99
+ thor (1.1.0)
100
+ tzinfo (2.0.4)
101
+ concurrent-ruby (~> 1.0)
102
+ unicode-display_width (2.0.0)
103
+ zeitwerk (2.4.2)
104
104
 
105
105
  PLATFORMS
106
106
  ruby
107
107
 
108
108
  DEPENDENCIES
109
- activerecord (>= 5.2.3)
109
+ activerecord (>= 6.1.4)
110
110
  byebug
111
111
  guard-rspec
112
112
  guard-rubocop
@@ -115,7 +115,7 @@ DEPENDENCIES
115
115
  rspec
116
116
  rubocop
117
117
  shoulda-matchers
118
- sqlite3 (~> 1.3.6)
118
+ sqlite3 (~> 1.4.0)
119
119
 
120
120
  BUNDLED WITH
121
- 1.17.3
121
+ 1.17.2
data/README.md CHANGED
@@ -30,9 +30,9 @@ class Person < ActiveRecord::Base
30
30
 
31
31
  # Rename a field - the old field and rename could be removed after
32
32
  # migrate! is called
33
- field :external_id, :string, length: 10
33
+ field :external_id, :string, limit: 10
34
34
  rename :external_id, :e_id
35
- field :e_id, :string, length: 10
35
+ field :e_id, :string, limit: 10
36
36
  # Delete a field - the old field and drop could be removed after
37
37
  # migrate! is called
38
38
  drop :name
@@ -99,7 +99,7 @@ You may use a type not in this list as long as it is supported by your database
99
99
 
100
100
  Available options are (none of these exists by default):
101
101
 
102
- ```:limit``` - Requests a maximum column length. This is the number of characters for a :string column and number of bytes for :text, :binary and :integer columns. This option is ignored by some backends.
102
+ ```:limit``` - Requests a maximum column limit. This is the number of characters for a :string column and number of bytes for :text, :binary and :integer columns. This option is ignored by some backends.
103
103
 
104
104
  ```:default``` - The column's default value. Use nil for NULL.
105
105
 
@@ -123,3 +123,9 @@ Create a `mappd.rb` initializer inside `config/initializers` and add the followi
123
123
  clazz.migrate! if clazz.ancestors.include?(ActiveRecord::Base)
124
124
  end
125
125
  ```
126
+
127
+ ## Donations
128
+
129
+ Mappd is free to all, but donations are welcome.
130
+
131
+ Bitcoin: 3EQRmXmkuje2Ww75Tp47RdinsPusCTLavx
data/lib/mappd.rb CHANGED
@@ -2,4 +2,8 @@ require 'rubygems' unless defined?(Gem)
2
2
  require 'active_record'
3
3
  require 'mappd/mappd'
4
4
 
5
- ActiveRecord::Base.send(:include, Mappd)
5
+ module ActiveRecord
6
+ class Base
7
+ include Mappd
8
+ end
9
+ end
data/lib/mappd/mappd.rb CHANGED
@@ -21,7 +21,7 @@ module Mappd
21
21
  end
22
22
 
23
23
  def timestamps
24
- commands << [:add_timestamps, [table_name, null: true]]
24
+ commands << [:add_timestamps, [table_name, { null: true }]]
25
25
  end
26
26
 
27
27
  def associations!
data/lib/mappd/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mappd
2
- VERSION = '5.2.3'.freeze
2
+ VERSION = '6.1.4'.freeze
3
3
  end
data/mappd.gemspec CHANGED
@@ -22,5 +22,7 @@ at you just know in others projects like DataMapper or MongoMapper.
22
22
  .split("\n").map { |f| File.basename(f) }
23
23
  s.require_paths = ['lib']
24
24
 
25
- s.add_dependency 'activerecord', '>=5.2.3'
25
+ s.add_dependency 'activerecord', '>=6.0.3'
26
+
27
+ s.required_ruby_version = '>= 2.6.0'
26
28
  end
data/spec/mappd_spec.rb CHANGED
@@ -20,7 +20,7 @@ RSpec.describe Person, type: :model do
20
20
  it { should_not have_db_column(:external_id) }
21
21
  it {
22
22
  should have_db_column(:e_id).of_type(:string)
23
- .with_options(length: 10)
23
+ .with_options(limit: 10)
24
24
  }
25
25
 
26
26
  it { should have_db_column(:country_id).of_type(:integer) }
data/spec/models.rb CHANGED
@@ -5,9 +5,9 @@ class Person < ActiveRecord::Base
5
5
  field :age, :integer
6
6
  field :score, :decimal, precision: 10, scale: 10, null: true
7
7
 
8
- field :external_id, :string, length: 10
8
+ field :external_id, :string, limit: 10
9
9
  rename :external_id, :e_id
10
- field :e_id, :string, length: 10
10
+ field :e_id, :string, limit: 10
11
11
 
12
12
  belongs_to :country
13
13
  has_many :pictures, as: :imageable
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mappd
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.3
4
+ version: 6.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Watson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-08 00:00:00.000000000 Z
11
+ date: 2021-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.2.3
19
+ version: 6.0.3
20
20
  type: :runtime
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: 5.2.3
26
+ version: 6.0.3
27
27
  description: "With it you can add the ability to create columns\noutside the default
28
28
  schema, directly in your model in a similar way t\nat you just know in others projects
29
29
  like DataMapper or MongoMapper.\n "
@@ -64,14 +64,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: '0'
67
+ version: 2.6.0
68
68
  required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  requirements:
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
73
  requirements: []
74
- rubygems_version: 3.0.3
74
+ rubygems_version: 3.0.3.1
75
75
  signing_key:
76
76
  specification_version: 4
77
77
  summary: Mappd is a micro gem that allow you to write schema inside your model as