rubiks 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ ## 0.1.8
2
+ * Add table_with_prefix
3
+
1
4
  ## 0.1.7
2
5
  * Add table_prefix setting
3
6
 
@@ -62,7 +62,7 @@ module ::Rubiks
62
62
  builder = builder || new_builder
63
63
 
64
64
  builder.cube(default_xml_attributes) do
65
- builder.table(:name => table)
65
+ builder.table(:name => table_with_prefix)
66
66
  dimensions.each{ |dimension| dimension.to_xml(builder) }
67
67
  measures.each{ |measure| measure.to_xml(builder) }
68
68
  calculated_measures.each{ |measure| measure.to_xml(builder) }
@@ -34,7 +34,7 @@ module ::Rubiks
34
34
  xml_attrs[:primaryKey] = 'id' unless degenerate?
35
35
  xml_attrs[:allMemberName] = all_member_name if has_all
36
36
  builder.hierarchy(xml_attrs) do
37
- builder.table(:name => table) unless degenerate?
37
+ builder.table(:name => table_with_prefix) unless degenerate?
38
38
  levels.each{ |level| level.to_xml(builder) }
39
39
  end
40
40
  end
@@ -73,7 +73,11 @@ module ::Rubiks
73
73
 
74
74
  def table(new_value=nil)
75
75
  @table = new_value if new_value.present?
76
- @table ||= @options[:table] || "#{Rubiks.table_prefix}#{name.tableize}"
76
+ @table ||= @options[:table] || name.tableize
77
+ end
78
+
79
+ def table_with_prefix
80
+ "#{Rubiks.table_prefix}#{table}"
77
81
  end
78
82
 
79
83
  def to_json(options={})
@@ -1,3 +1,3 @@
1
1
  module ::Rubiks
2
- VERSION = '0.1.7'
2
+ VERSION = '0.1.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubiks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -164,7 +164,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
164
164
  version: '0'
165
165
  segments:
166
166
  - 0
167
- hash: 3628922799881598040
167
+ hash: 486716753856110234
168
168
  required_rubygems_version: !ruby/object:Gem::Requirement
169
169
  none: false
170
170
  requirements:
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  version: '0'
174
174
  segments:
175
175
  - 0
176
- hash: 3628922799881598040
176
+ hash: 486716753856110234
177
177
  requirements: []
178
178
  rubyforge_project:
179
179
  rubygems_version: 1.8.25