zendesk-features 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -68,6 +68,23 @@ We also created a view helper to help you generate the UI for enabling and disab
68
68
  </h3>
69
69
  <% end %>
70
70
 
71
+ == Installation
72
+
73
+ Install the gem in your rails project by putting it in your environment.rb:
74
+
75
+ config.gem 'zendesk-features', :lib => 'features', :source => 'http://gems.github.com'
76
+
77
+ and do a sudo rake gems:install
78
+
79
+ Also remember to create the features table. Depending on the name of the model you choose to associate with features in
80
+ your project, you could create the table like:
81
+
82
+ create_table :features do |t|
83
+ t.string :type, :null => false
84
+ t.integer :account_id, :null => false
85
+ t.timestamps
86
+ end
87
+
71
88
  == Known issues
72
89
 
73
90
  Let us know if you find any.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
data/features.gemspec ADDED
@@ -0,0 +1,52 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{features}
5
+ s.version = "1.0.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Mick Staugaard", "Morten Primdahl"]
9
+ s.date = %q{2009-06-02}
10
+ s.email = %q{mick@zendesk.com}
11
+ s.extra_rdoc_files = [
12
+ "README.rdoc"
13
+ ]
14
+ s.files = [
15
+ ".gitignore",
16
+ "README.rdoc",
17
+ "Rakefile",
18
+ "VERSION",
19
+ "features.gemspec",
20
+ "lib/features.rb",
21
+ "lib/features/active_record_extension.rb",
22
+ "lib/features/feature.rb",
23
+ "lib/features/features_helper.rb",
24
+ "test/database.yml",
25
+ "test/features_test.rb",
26
+ "test/fixtures/accounts.yml",
27
+ "test/fixtures/features.yml",
28
+ "test/schema.rb",
29
+ "test/test_helper.rb"
30
+ ]
31
+ s.has_rdoc = true
32
+ s.homepage = %q{http://github.com/zendesk/features}
33
+ s.rdoc_options = ["--charset=UTF-8"]
34
+ s.require_paths = ["lib"]
35
+ s.rubygems_version = %q{1.3.1}
36
+ s.summary = %q{Features is a nice little gem for associating application features with an active record model in a Rails app}
37
+ s.test_files = [
38
+ "test/features_test.rb",
39
+ "test/schema.rb",
40
+ "test/test_helper.rb"
41
+ ]
42
+
43
+ if s.respond_to? :specification_version then
44
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
45
+ s.specification_version = 2
46
+
47
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
48
+ else
49
+ end
50
+ else
51
+ end
52
+ end
@@ -116,7 +116,7 @@ module Features
116
116
  @feature_owner_sym = owner_class.name.underscore.to_sym
117
117
  belongs_to @feature_owner_sym
118
118
  validates_presence_of @feature_owner_sym
119
- if owner_class.column_names.include?('updated_at')
119
+ if owner_class.table_exists? && owner_class.column_names.include?('updated_at')
120
120
  before_create :update_owner_timestamp
121
121
  before_destroy :update_owner_timestamp
122
122
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zendesk-features
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mick Staugaard
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-06-01 00:00:00 -07:00
13
+ date: 2009-06-02 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -27,6 +27,7 @@ files:
27
27
  - README.rdoc
28
28
  - Rakefile
29
29
  - VERSION
30
+ - features.gemspec
30
31
  - lib/features.rb
31
32
  - lib/features/active_record_extension.rb
32
33
  - lib/features/feature.rb