translated_attributes 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,9 +1,6 @@
1
- desc "Run all specs in spec directory"
2
- task :default do
3
- options = "--colour --format progress --loadby --reverse"
4
- files = FileList['spec/**/*_spec.rb']
5
- system("spec #{options} #{files}")
6
- end
1
+ task :default => :spec
2
+ require 'spec/rake/spectask'
3
+ Spec::Rake::SpecTask.new {|t| t.spec_opts = ['--color']}
7
4
 
8
5
  begin
9
6
  project_name = 'translated_attributes'
@@ -14,18 +11,10 @@ begin
14
11
  gem.email = "grosser.michael@gmail.com"
15
12
  gem.homepage = "http://github.com/grosser/#{project_name}"
16
13
  gem.authors = ["Michael Grosser"]
17
- gem.files += (FileList["{lib,spec}/**/*"] + FileList["VERSION"] + FileList["README.markdown"]).to_a.sort
18
14
  gem.add_dependency ['activerecord']
19
- gem.rubyforge_project = 'translated-attr'
20
15
  end
21
16
 
22
- # fake task so that rubyforge:release works
23
- task :rdoc do
24
- `mkdir rdoc`
25
- `echo documentation is at http://github.com/grosser/#{project_name} > rdoc/README.rdoc`
26
- end
27
-
28
- Jeweler::RubyforgeTasks.new
17
+ Jeweler::GemcutterTasks.new
29
18
  rescue LoadError
30
19
  puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
31
20
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.2
@@ -125,7 +125,7 @@ module TranslatedAttributes
125
125
  def merge_db_translations_with_instance_variable
126
126
  return if new_record? or @db_translations_merged
127
127
  @db_translations_merged = true
128
- translations.all.each do |t|
128
+ translations.each do |t|
129
129
  translated_attributes_for(t.language)[t.attribute] = t.text
130
130
  end
131
131
  end
@@ -136,7 +136,7 @@ describe 'Translated attributes' do
136
136
  it "loads translations once" do
137
137
  Product.create!(:title=>'xx', :description=>'yy')
138
138
  p = Product.last
139
- p.translations.should_receive(:all).and_return []
139
+ p.should_receive(:translations).and_return []
140
140
  p.title.should == nil
141
141
  p.description.should == nil
142
142
  end
@@ -1,50 +1,42 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{translated_attributes}
8
- s.version = "0.5.1"
8
+ s.version = "0.5.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Grosser"]
12
- s.date = %q{2009-10-16}
12
+ s.date = %q{2009-11-22}
13
13
  s.email = %q{grosser.michael@gmail.com}
14
14
  s.extra_rdoc_files = [
15
15
  "README.markdown"
16
16
  ]
17
17
  s.files = [
18
18
  "MIGRATION",
19
- "README.markdown",
20
19
  "README.markdown",
21
20
  "Rakefile",
22
21
  "VERSION",
23
- "VERSION",
24
22
  "init.rb",
25
23
  "lib/translated_attributes.rb",
26
- "lib/translated_attributes.rb",
27
24
  "spec/integration_spec.rb",
28
- "spec/integration_spec.rb",
29
- "spec/models.rb",
30
25
  "spec/models.rb",
31
26
  "spec/spec_helper.rb",
32
- "spec/spec_helper.rb",
33
- "spec/translated_attributes_spec.rb",
34
27
  "spec/translated_attributes_spec.rb",
35
28
  "translated_attributes.gemspec"
36
29
  ]
37
30
  s.homepage = %q{http://github.com/grosser/translated_attributes}
38
31
  s.rdoc_options = ["--charset=UTF-8"]
39
32
  s.require_paths = ["lib"]
40
- s.rubyforge_project = %q{translated-attr}
41
33
  s.rubygems_version = %q{1.3.5}
42
34
  s.summary = %q{ActiveRecord/Rails simple translatable attributes}
43
35
  s.test_files = [
44
- "spec/integration_spec.rb",
45
- "spec/spec_helper.rb",
36
+ "spec/spec_helper.rb",
46
37
  "spec/translated_attributes_spec.rb",
47
- "spec/models.rb"
38
+ "spec/models.rb",
39
+ "spec/integration_spec.rb"
48
40
  ]
49
41
 
50
42
  if s.respond_to? :specification_version then
@@ -60,3 +52,4 @@ Gem::Specification.new do |s|
60
52
  s.add_dependency(%q<activerecord>, [">= 0"])
61
53
  end
62
54
  end
55
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: translated_attributes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-16 00:00:00 +02:00
12
+ date: 2009-11-22 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -65,13 +65,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  version:
66
66
  requirements: []
67
67
 
68
- rubyforge_project: translated-attr
68
+ rubyforge_project:
69
69
  rubygems_version: 1.3.5
70
70
  signing_key:
71
71
  specification_version: 3
72
72
  summary: ActiveRecord/Rails simple translatable attributes
73
73
  test_files:
74
- - spec/integration_spec.rb
75
74
  - spec/spec_helper.rb
76
75
  - spec/translated_attributes_spec.rb
77
76
  - spec/models.rb
77
+ - spec/integration_spec.rb