cartoonist-twitter 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/app/models/tweet.rb +1 -18
  2. metadata +7 -7
@@ -1,4 +1,5 @@
1
1
  class Tweet < ActiveRecord::Base
2
+ include BelongsToEntity
2
3
  validate :doesnt_update_tweet_after_tweeted
3
4
  validate :entity_doesnt_change, :on => :update
4
5
  attr_accessible :entity_id, :entity_type, :tweet, :tweeted_at
@@ -21,14 +22,6 @@ class Tweet < ActiveRecord::Base
21
22
  tweet_style == :disabled
22
23
  end
23
24
 
24
- def entity
25
- @entity ||= Cartoonist::Entity[entity_type.to_sym].find(entity_id)
26
- end
27
-
28
- def description
29
- "#{entity.entity_localized_label}: #{entity.entity_description}"
30
- end
31
-
32
25
  def formatted_tweeted_at(default_msg = "not yet tweeted")
33
26
  return default_msg unless tweeted_at
34
27
  tweeted_at.localtime.strftime "%-m/%-d/%Y at %-l:%M %P"
@@ -116,16 +109,6 @@ class Tweet < ActiveRecord::Base
116
109
  end
117
110
  end
118
111
 
119
- def entity_doesnt_change
120
- if entity_id_changed?
121
- errors.add :entity_id, "can't change"
122
- end
123
-
124
- if entity_type_changed?
125
- errors.add :entity_id, "can't change"
126
- end
127
- end
128
-
129
112
  class << self
130
113
  def update_tweet(params)
131
114
  tweet = find params[:id].to_i
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cartoonist-twitter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-24 00:00:00.000000000 Z
12
+ date: 2012-05-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cartoonist
16
- requirement: &19187680 !ruby/object:Gem::Requirement
16
+ requirement: &14332980 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - =
20
20
  - !ruby/object:Gem::Version
21
- version: 0.0.10
21
+ version: 0.0.11
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *19187680
24
+ version_requirements: *14332980
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: twitter
27
- requirement: &19187080 !ruby/object:Gem::Requirement
27
+ requirement: &14330860 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 2.2.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *19187080
35
+ version_requirements: *14330860
36
36
  description: Plugin to allow tweeting of cartoonist entities.
37
37
  email: reasonnumber@gmail.com
38
38
  executables: []