haraway 0.1.0.dev.50 → 0.1.0.dev.52

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0ba9179cdab2390040d9917b2075bf672916b7f5
4
- data.tar.gz: 5bebe1c3091291de9a173ff31479a7582ce6119f
3
+ metadata.gz: 15bdd1687281c525f7da8e7950a6f812589583f9
4
+ data.tar.gz: 2cd1305ab46edcec4ddd833a6d1759417a40c355
5
5
  SHA512:
6
- metadata.gz: d2e8f4dfc088838c5b06dd19f719e915dccd1a3e20a2a0989a40c35bb3bfc099d5a7a95b255bc89809e46d5626c6bb407bd698e86ed1043ed60beb27824f8654
7
- data.tar.gz: ddb81fd73cf922ef96e2231bca8cc7b4bbb110fecda089af1698298e432486ebb5c18dd9effe7ace24ff25d9afbfcb5f0c95cbcedf7abf2dbd019591fb4e6930
6
+ metadata.gz: 6625e3ff2f1baceecff06b4c43d1cfea4cdbfe6963b91420e409add767fa0f0c93bd3deb991c7087798a661d869bdce91161ca609cf885e282701cb3c5727bd4
7
+ data.tar.gz: 8dbfdf103f47dab13b9a8c54f9e44669d6fcc3e1b8b2360816546616da3b83f8e95ead31e2f7c9609d62553f4ad9bf16aad4f3035d24e227e6634766c0598e66
@@ -107,7 +107,7 @@ private
107
107
  include Module.new.class_eval <<-RUBY, __FILE__, __LINE__+1
108
108
 
109
109
  def #{name}
110
- haraway_read_assets(#{name.inspect}).first
110
+ haraway_read_assets(#{name.inspect}).first || Haraway::ActiveRecord::NullAsset.new
111
111
  end
112
112
 
113
113
  def #{name}=(value)
@@ -0,0 +1,38 @@
1
+ class Haraway::ActiveRecord::NullAsset < Haraway::ActiveRecord::Asset
2
+
3
+ attr_reader :id
4
+
5
+ def initialize(attributes)
6
+ @id = "blank"
7
+ end
8
+
9
+ def destroy?
10
+ false
11
+ end
12
+
13
+ def destroy!
14
+ end
15
+
16
+ def url(version=nil)
17
+ nil
18
+ end
19
+
20
+ def update_attributes(attributes)
21
+ end
22
+
23
+ def attributes
24
+ nil
25
+ end
26
+
27
+ def method_missing(m, *a, &b)
28
+ case m.to_s
29
+ when /^[a-z_][a-z0-9_]*$/
30
+ when /^[a-z_][a-z0-9_]*[=]$/
31
+
32
+ else
33
+ super
34
+
35
+ end
36
+ end
37
+
38
+ end
@@ -2,6 +2,7 @@ module Haraway::ActiveRecord
2
2
 
3
3
  require 'haraway/active_record/macro'
4
4
  require 'haraway/active_record/asset'
5
+ require 'haraway/active_record/null_asset'
5
6
  require 'haraway/active_record/asset_definition'
6
7
 
7
8
  end
@@ -1,6 +1,6 @@
1
1
  module Haraway
2
2
  VERSION = "0.1.0"
3
- BUILD = "50"
3
+ BUILD = "52"
4
4
 
5
5
  if BUILD != ("{{BUILD_NUMBER" + "}}") # prevent sed replacement (see script/ci)
6
6
  BUILD_VERSION = "#{VERSION}.dev.#{BUILD}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haraway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.dev.50
4
+ version: 0.1.0.dev.52
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Menke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-06 00:00:00.000000000 Z
11
+ date: 2014-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -74,6 +74,7 @@ files:
74
74
  - lib/haraway/active_record/asset.rb
75
75
  - lib/haraway/active_record/asset_definition.rb
76
76
  - lib/haraway/active_record/macro.rb
77
+ - lib/haraway/active_record/null_asset.rb
77
78
  - lib/haraway/committer.rb
78
79
  - lib/haraway/config.rb
79
80
  - lib/haraway/credentials.rb