irm_yaml_db 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
data/irm_yaml_db.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "irm_yaml_db"
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["uudui"]
@@ -172,11 +172,16 @@ module SerializationHelper
172
172
  end
173
173
 
174
174
  def self.base_tables
175
- sql = "select table_name from information_schema.tables where table_schema='irm_dev' and table_type='base table';"
175
+
176
+ sql = "select table_name from information_schema.tables where table_schema='#{database}' and table_type='base table';"
176
177
  base_tables = ActiveRecord::Base.connection.execute(sql, 'SCHEMA').collect do |field|
177
178
  field.first
178
179
  end
179
- base_tables.reject { |table| ['schema_info', 'schema_migrations','irm_data_accesses_top_org_t'].include?(table) }
180
+ base_tables.reject { |table| ['schema_info', 'schema_migrations'].include?(table) }
181
+ end
182
+
183
+ def self.database
184
+ Rails.configuration.database_configuration[Rails.env]["database"]
180
185
  end
181
186
 
182
187
  def self.tables
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irm_yaml_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: