baza_models 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3de3c11b6d7e028cf0bc3c1b0f8cd8b63718499a
4
- data.tar.gz: cf06183a93093983fedf4e4adef1d1b333b626ac
3
+ metadata.gz: 460ee912d039c88a90e0b90fc6a4a594c0716632
4
+ data.tar.gz: 7a65b1e9fcb98844dde9bd77ef05cbee35eacc11
5
5
  SHA512:
6
- metadata.gz: a72519f5547333647837c34d992c3f11e48eed797561a98c8c641a4fa56b67ebfe76c06979fc12ded41af6807b8c58007701a9ac5629a3ee71ace56e945cbe72
7
- data.tar.gz: 78916b055f54b09e554b8d90a2e82e5af2b1d8f02c46a2b798997d1d085f5bb46512b94d23cb0b18dcb73c218cf5e9ccb3e849368f674945747e083841cb0b5c
6
+ metadata.gz: af048eeba875ca4b41bd6330c18a0dadbf4e4705c82b1e4d25fd4321f725aa71e27b9ad020da069522ea25039975d61f0c13e196e09f6e54536f07eb9b847a33
7
+ data.tar.gz: 25b301c10a7befbdf3b80714427f2cae95ebf4753916f164d5090e117099849c595c31c13534513360891b125d88f7997a9a70fd199d9170556b94d4f3ae2261
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ source "http://rubygems.org"
5
5
 
6
6
  gem "array_enumerator", ">= 0.0.10"
7
7
  gem "auto_autoloader", ">= 0.0.1"
8
- gem "baza", "~> 0.0.21"
8
+ gem "baza", "~> 0.0.31"
9
9
  gem "html_gen", ">= 0.0.12", require: false
10
10
  gem "simple_delegate", ">= 0.0.2"
11
11
  gem "string-cases", ">= 0.0.3"
@@ -19,7 +19,7 @@ GEM
19
19
  ast (2.2.0)
20
20
  auto_autoloader (0.0.4)
21
21
  string-cases
22
- baza (0.0.21)
22
+ baza (0.0.31)
23
23
  array_enumerator (~> 0.0.10)
24
24
  auto_autoloader (~> 0.0.1)
25
25
  datet (~> 0.0.25)
@@ -131,7 +131,7 @@ PLATFORMS
131
131
  DEPENDENCIES
132
132
  array_enumerator (>= 0.0.10)
133
133
  auto_autoloader (>= 0.0.1)
134
- baza (~> 0.0.21)
134
+ baza (~> 0.0.31)
135
135
  best_practice_project!
136
136
  bundler (~> 1.0)
137
137
  factory_girl
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.11
1
+ 0.0.12
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: baza_models 0.0.11 ruby lib
5
+ # stub: baza_models 0.0.12 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "baza_models".freeze
9
- s.version = "0.0.11"
9
+ s.version = "0.0.12"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
@@ -113,7 +113,7 @@ Gem::Specification.new do |s|
113
113
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
114
114
  s.add_runtime_dependency(%q<array_enumerator>.freeze, [">= 0.0.10"])
115
115
  s.add_runtime_dependency(%q<auto_autoloader>.freeze, [">= 0.0.1"])
116
- s.add_runtime_dependency(%q<baza>.freeze, ["~> 0.0.21"])
116
+ s.add_runtime_dependency(%q<baza>.freeze, ["~> 0.0.31"])
117
117
  s.add_runtime_dependency(%q<html_gen>.freeze, [">= 0.0.12"])
118
118
  s.add_runtime_dependency(%q<simple_delegate>.freeze, [">= 0.0.2"])
119
119
  s.add_runtime_dependency(%q<string-cases>.freeze, [">= 0.0.3"])
@@ -130,7 +130,7 @@ Gem::Specification.new do |s|
130
130
  else
131
131
  s.add_dependency(%q<array_enumerator>.freeze, [">= 0.0.10"])
132
132
  s.add_dependency(%q<auto_autoloader>.freeze, [">= 0.0.1"])
133
- s.add_dependency(%q<baza>.freeze, ["~> 0.0.21"])
133
+ s.add_dependency(%q<baza>.freeze, ["~> 0.0.31"])
134
134
  s.add_dependency(%q<html_gen>.freeze, [">= 0.0.12"])
135
135
  s.add_dependency(%q<simple_delegate>.freeze, [">= 0.0.2"])
136
136
  s.add_dependency(%q<string-cases>.freeze, [">= 0.0.3"])
@@ -148,7 +148,7 @@ Gem::Specification.new do |s|
148
148
  else
149
149
  s.add_dependency(%q<array_enumerator>.freeze, [">= 0.0.10"])
150
150
  s.add_dependency(%q<auto_autoloader>.freeze, [">= 0.0.1"])
151
- s.add_dependency(%q<baza>.freeze, ["~> 0.0.21"])
151
+ s.add_dependency(%q<baza>.freeze, ["~> 0.0.31"])
152
152
  s.add_dependency(%q<html_gen>.freeze, [">= 0.0.12"])
153
153
  s.add_dependency(%q<simple_delegate>.freeze, [">= 0.0.2"])
154
154
  s.add_dependency(%q<string-cases>.freeze, [">= 0.0.3"])
@@ -45,7 +45,7 @@ class BazaModels::Model
45
45
 
46
46
  QUERY_METHODS = [
47
47
  :average, :all, :any?, :destroy_all, :each, :empty?, :ids, :maximum, :minimum, :none?, :count, :find, :first, :find_first, :last,
48
- :length, :size, :select, :includes, :joins, :group, :where, :order, :pluck, :preloads, :sum, :limit, :to_a, :accessible_by, :ransack
48
+ :length, :size, :select, :includes, :joins, :group, :where, :order, :pluck, :preloads, :sum, :limit, :accessible_by, :ransack
49
49
  ].freeze
50
50
  QUERY_METHODS.each do |query_method|
51
51
  (class << self; self; end).__send__(:define_method, query_method) do |*args, &blk|
@@ -211,6 +211,13 @@ describe "BazaModels::Model" do
211
211
  expect(user.email).to eq "test@example.com"
212
212
  end
213
213
 
214
+ describe "#to_a" do
215
+ it "should not respond to it, because it will fuck up Array(ModelClass)" do
216
+ expect { User.to_a }.to raise_error(NoMethodError)
217
+ expect { User.to_ary }.to raise_error(NoMethodError)
218
+ end
219
+ end
220
+
214
221
  describe "#attribute_before_last_save" do
215
222
  it "returns the value as it was before the save" do
216
223
  user.save!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baza_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaspernj
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.0.21
47
+ version: 0.0.31
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.0.21
54
+ version: 0.0.31
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: html_gen
57
57
  requirement: !ruby/object:Gem::Requirement