pullentity-client 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTZlZjFlMWFiMzUxM2VkYjVkNWU3MmZiNGJmMDk3NmRjNDVmNjM0ZA==
4
+ ZTJiZDY3OWY5MWZiNzFmYzZmYjYxOWZhMjFkMmY3Y2VhNjYxZGVjMQ==
5
5
  data.tar.gz: !binary |-
6
- YmVhN2NjYzBlZDRjZDU4OGE5MDFmY2E2OGQwMTI0NzZlZTJjMDg0Yg==
6
+ ZTQ4M2M0NWQyZjdkOWM1M2Y1NzM4ZWI4OGNmMTVlYjE0MTRhODY3Mw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZDVhMWY2OTBmMWY5OTJjNDhmZmFhMjZjYjJkY2E1MzM5NjgyOGI1MGQ5YTQ4
10
- MzYzNDMzN2FmZjI1ZmI0YTQ2NzNkNmZjMWVkYWM4MTA1ODIzMTg0ZmMyMWVh
11
- NDA4NzFhMWY5M2JjODMxOGNjNjgxZDQzNTkzYjEyNTNiOGU5YzM=
9
+ MTMwNTQzNDk5ODg2ZmRkMzE4ZDljNjQ3N2E1OGI0MjhlNjAzMmJmNTRmNjIz
10
+ ZTM1MTNkNDk2YjZiMTliODljMmU5NDA5Yjg3MTFjZTk2ODVhYTU0NWVlODg4
11
+ MjJlYTI4MzU0MDEzOWM4YjU1Mzg5N2MzYTE0Njc4YTgzMzM0ZTM=
12
12
  data.tar.gz: !binary |-
13
- YWE5ZGEyMjM2MGFkMmRlNWNkZmY2MzE1ZDRhMWE2N2EwZjBhNzc3MDJjYWQx
14
- NzFiOGRjN2NlMjA5YzUxN2YyYjA0YTJlOWMxNWM1MzQ5MGY4MzVkMDU1NDQ5
15
- ODUwYTM4ZTYxOGI4NmI4YzQxYWIzOGMyMWIyNzc4ODM1MDhiMGM=
13
+ ZjkyNTM0MWVkYzY2ZTY3OWZmOWZmNWI0MWEyY2Q2MjZjM2ZjNzllYTM2Zjdm
14
+ MjM4MTdlZjlkZTE4NWQ4ZDgzMzc5NjAyMmQ1YzBlMWE1ZWE2ZDAwZmE3NmZi
15
+ Yjc3MmVkYTMwYjU0MTFkODQ4YmUwYjUzMzI0OTg5ZDFlNjdlY2E=
@@ -121,6 +121,14 @@ module Pullentity
121
121
  response = conn.put("/api/v1/upload_assets?auth_token=#{@token}&subdomain=#{@site}&theme_name=#{@theme_name}", payload )
122
122
 
123
123
  say JSON.parse(response.body)
124
+
125
+ say "upload images", :green
126
+ images.each do |image|
127
+ payload = { :file => Faraday::UploadIO.new("#{image}", 'text/json') }
128
+ response = conn.put("/api/v1/upload_assets?auth_token=#{@token}&subdomain=#{@site}&theme_name=#{@theme_name}", payload )
129
+ say JSON.parse(response.body)
130
+ end
131
+
124
132
  end
125
133
 
126
134
  def images
@@ -3,29 +3,68 @@ require 'middleman-target'
3
3
 
4
4
  module Pullentity::Client::Helpers
5
5
 
6
- def javascript_include_tag(file)
7
- if target?(:pullentity)
8
- path = "/uploads/theme_asset/#{site_name}/theme/#{theme_name}/assets/#{file}"
9
- "<script src='#{path}.js' type='text/javascript'></script>"
10
- else
11
- super
12
- end
6
+ def javascript_include_tag(file)
7
+ if target?(:pullentity)
8
+ path = "/uploads/theme_asset/#{site_name}/theme/#{theme_name}/assets/#{file}"
9
+ "<script src='#{path}.js' type='text/javascript'></script>"
10
+ else
11
+ super
13
12
  end
13
+ end
14
14
 
15
- def stylesheet_link_tag(file)
16
- if target?(:pullentity)
17
- path = "/uploads/theme_asset/#{site_name}/theme/#{theme_name}/assets/#{file}"
18
- "<link href='#{path}.css' media='screen' rel='stylesheet' type='text/css' />"
19
- else
20
- super
21
- end
15
+ def stylesheet_link_tag(file)
16
+ if target?(:pullentity)
17
+ path = "/uploads/theme_asset/#{site_name}/theme/#{theme_name}/assets/#{file}"
18
+ "<link href='#{path}.css' media='screen' rel='stylesheet' type='text/css' />"
19
+ else
20
+ super
21
+ end
22
+ end
23
+
24
+ def test_data_include_tag
25
+ unless target?(:pullentity)
26
+ javascript_include_tag "test-data"
27
+ end
28
+ end
29
+
30
+ def site_name
31
+ hsh = YAML.load_file(location + "pullentity.yml")
32
+ hsh["site"]
33
+ end
34
+
35
+ def theme_name
36
+ hsh = YAML.load_file(location + "pullentity.yml")
37
+ hsh["theme_name"]
38
+ end
39
+
40
+ def location
41
+ @location ||= Pathname.new(Dir.pwd)
42
+ end
43
+
44
+ def asset_pathxxxx(file)
45
+ if target?(:pullentity)
46
+ 'yea'
47
+ else
48
+ super
22
49
  end
50
+ end
51
+
23
52
 
24
- def test_data_include_tag
25
- unless target?(:pullentity)
26
- javascript_include_tag "test-data"
53
+ end
54
+
55
+ module Pullentity::Client::MiddlemanConfig
56
+ class << self
57
+ def registered(app)
58
+ app.helpers Pullentity::Client::Helpers
59
+ app.set :site_name, site_name
60
+ app.set :theme_name, theme_name
61
+ app.compass_config do |config|
62
+ # config is the Compass.configuration object
63
+ config.output_style = :compact
64
+ config.http_images_path = "/uploads/theme_asset/#{site_name}/theme/#{theme_name}/assets"
27
65
  end
28
- end
66
+ end
67
+
29
68
  def site_name
30
69
  hsh = YAML.load_file(location + "pullentity.yml")
31
70
  hsh["site"]
@@ -40,13 +79,8 @@ module Pullentity::Client::Helpers
40
79
  @location ||= Pathname.new(Dir.pwd)
41
80
  end
42
81
 
43
- def asset_pathxxxx(file)
44
- if target?(:pullentity)
45
- 'yea'
46
- else
47
- super
48
- end
49
- end
50
-
82
+ alias :included :registered
83
+ end
84
+ end
51
85
 
52
- end
86
+ ::Middleman::Extensions.register(:pullentity_config, Pullentity::Client::MiddlemanConfig)
@@ -3,7 +3,6 @@
3
3
  #"<%= app_name %>"
4
4
 
5
5
  require "pullentity-client/helpers"
6
- helpers Pullentity::Client::Helpers
7
6
 
8
7
  set :sass_assets_paths, []
9
8
  set :relative_links, false
@@ -1,5 +1,5 @@
1
1
  module Pullentity
2
2
  module Client
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pullentity-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - miguel michelson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-30 00:00:00.000000000 Z
11
+ date: 2013-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coffee-script
@@ -318,7 +318,7 @@ files:
318
318
  - vendor/assets/javascripts/pullentity.js
319
319
  - vendor/assets/javascripts/pullentity/.DS_Store
320
320
  - vendor/assets/stylesheets/.DS_Store
321
- - vendor/assets/stylesheets/pullentity.css.scss
321
+ - vendor/assets/stylesheets/pullentity.css.scss.erb
322
322
  - vendor/assets/stylesheets/pullentity/themes/default.css.scss
323
323
  homepage: ''
324
324
  licenses: []