swissmatch-rails 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -76,4 +76,4 @@ If you need a different license, please ask the author.
76
76
  Credits
77
77
  -------
78
78
 
79
- * [AWD Switzerland](http://www.awd.ch/) for donating time to work on this gem.
79
+ * [Swiss Life Select Schweiz AG](http://www.swisslife-select.ch/) for donating time to work on this gem.
@@ -85,7 +85,8 @@ module SwissMatch
85
85
  hash[:canton_id] = canton2id[hash.delete(:canton)]
86
86
  hash[:language] = LanguageToCode[hash.delete(:language)]
87
87
  hash[:language_alternative] = LanguageToCode[hash.delete(:language_alternative)]
88
- hash[:community_id] = hash.delete(:community)
88
+ hash[:community_id] = hash.delete(:largest_community)
89
+ hash.delete(:communities)
89
90
  hash.update(
90
91
  :suggested_name_de => zip_code.suggested_name(:de),
91
92
  :suggested_name_fr => zip_code.suggested_name(:fr),
@@ -0,0 +1,15 @@
1
+ # encoding: utf-8
2
+
3
+ begin
4
+ require 'rubygems/version' # newer rubygems use this
5
+ rescue LoadError
6
+ require 'gem/version' # older rubygems use this
7
+ end
8
+
9
+ module SwissMatch
10
+ module Rails
11
+
12
+ # The version of the swissmatch-location gem.
13
+ Version = Gem::Version.new("0.0.4")
14
+ end
15
+ end
@@ -5,11 +5,16 @@
5
5
 
6
6
  raise "This file should be required after rails has been loaded" unless defined?(ActiveSupport)
7
7
 
8
+ module SwissMatch
9
+ module Rails
10
+ end
11
+ end
12
+
8
13
  ActiveSupport.on_load(:before_initialize) do
9
14
  require 'swissmatch'
10
15
 
11
16
  # Load environment specific configuration
12
- config_path = Rails.root.join('config/swissmatch.yml')
17
+ config_path = ::Rails.root.join('config/swissmatch.yml')
13
18
  configuration_all = File.exist?(config_path) ? YAML.load_file(config_path) : {}
14
19
  configuration = configuration_all['global'] || {}
15
20
  configuration.merge!(configuration_all[Rails.env] || {})
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "swissmatch-rails"
5
- s.version = "0.0.3"
5
+ s.version = "0.0.4"
6
6
  s.authors = "Stefan Rusterholz"
7
7
  s.email = "stefan.rusterholz@gmail.com"
8
8
  s.homepage = "http://github.com/apeiros/swissmatch-rails"
@@ -29,8 +29,7 @@ Gem::Specification.new do |s|
29
29
  ]
30
30
 
31
31
  if File.directory?('bin') then
32
- executables = Dir.chdir('bin') { Dir.glob('**/*').select { |f| File.executable?(f) } }
33
- s.executables = executables unless executables.empty?
32
+ s.executables = Dir.chdir('bin') { Dir.glob('**/*').select { |f| File.executable?(f) } }
34
33
  end
35
34
 
36
35
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1")
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swissmatch-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
4
  prerelease:
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Stefan Rusterholz
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-11 00:00:00.000000000 Z
12
+ date: 2013-04-09 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Adds ActiveRecord models and javascript assets for rails to swissmatch.
15
15
  email: stefan.rusterholz@gmail.com
@@ -20,6 +20,7 @@ extra_rdoc_files: []
20
20
  files:
21
21
  - bin/swissmatch_db
22
22
  - lib/swissmatch/activerecord.rb
23
+ - lib/swissmatch/rails/version.rb
23
24
  - lib/swissmatch/rails.rb
24
25
  - swissmatch-rails.gemspec
25
26
  - LICENSE.txt
@@ -45,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
45
46
  version: 1.3.1
46
47
  requirements: []
47
48
  rubyforge_project:
48
- rubygems_version: 1.8.24
49
+ rubygems_version: 1.8.25
49
50
  signing_key:
50
51
  specification_version: 3
51
52
  summary: Adds ActiveRecord models and javascript assets for rails to swissmatch.