rails-properties 3.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,17 @@
1
+ module ActiveRecord
2
+ class QueryCounter
3
+ attr_reader :query_count
4
+
5
+ def initialize
6
+ @query_count = 0
7
+ end
8
+
9
+ def to_proc
10
+ lambda(&method(:callback))
11
+ end
12
+
13
+ def callback(name, start, finish, message_id, values)
14
+ @query_count += 1 unless %w(CACHE SCHEMA).include?(values[:name]) || values[:sql] =~ /^begin/i || values[:sql] =~ /^commit/i
15
+ end
16
+ end
17
+ end
metadata ADDED
@@ -0,0 +1,172 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rails-properties
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.4.3
5
+ platform: ruby
6
+ authors:
7
+ - Fletcher Fowler
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-07-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activerecord
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '3.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '3.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: sqlite3
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: coveralls
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 0.11.2
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 0.11.2
97
+ description: Properties gem for Ruby on Rails
98
+ email:
99
+ - fletch@fzf.me
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - ".gitignore"
105
+ - ".travis.yml"
106
+ - Gemfile
107
+ - MIT-LICENSE
108
+ - README.md
109
+ - Rakefile
110
+ - ci/Gemfile-rails-3-1
111
+ - ci/Gemfile-rails-3-2
112
+ - ci/Gemfile-rails-4-0
113
+ - ci/Gemfile-rails-4-1
114
+ - ci/Gemfile-rails-4-2
115
+ - ci/Gemfile-rails-5-0
116
+ - ci/Gemfile-rails-5-1
117
+ - ci/Gemfile-rails-5-2
118
+ - lib/generators/rails_properties/migration/migration_generator.rb
119
+ - lib/generators/rails_properties/migration/templates/migration.rb
120
+ - lib/rails-properties.rb
121
+ - lib/rails-properties/base.rb
122
+ - lib/rails-properties/configuration.rb
123
+ - lib/rails-properties/property_object.rb
124
+ - lib/rails-properties/scopes.rb
125
+ - lib/rails-properties/version.rb
126
+ - rails-properties.gemspec
127
+ - spec/configuration_spec.rb
128
+ - spec/database.yml
129
+ - spec/properties_spec.rb
130
+ - spec/property_object_spec.rb
131
+ - spec/queries_spec.rb
132
+ - spec/scopes_spec.rb
133
+ - spec/serialize_spec.rb
134
+ - spec/spec_helper.rb
135
+ - spec/support/matchers/perform_queries.rb
136
+ - spec/support/query_counter.rb
137
+ homepage: https://github.com/1debit/rails-properties
138
+ licenses:
139
+ - MIT
140
+ metadata: {}
141
+ post_install_message:
142
+ rdoc_options: []
143
+ require_paths:
144
+ - lib
145
+ required_ruby_version: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ version: 1.9.3
150
+ required_rubygems_version: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
155
+ requirements: []
156
+ rubyforge_project:
157
+ rubygems_version: 2.5.2
158
+ signing_key:
159
+ specification_version: 4
160
+ summary: Ruby gem to handle properties for ActiveRecord instances by storing them
161
+ as serialized Hash in a separate database table. Namespaces and defaults included.
162
+ test_files:
163
+ - spec/configuration_spec.rb
164
+ - spec/database.yml
165
+ - spec/properties_spec.rb
166
+ - spec/property_object_spec.rb
167
+ - spec/queries_spec.rb
168
+ - spec/scopes_spec.rb
169
+ - spec/serialize_spec.rb
170
+ - spec/spec_helper.rb
171
+ - spec/support/matchers/perform_queries.rb
172
+ - spec/support/query_counter.rb