pullentity-client 0.0.8 → 0.0.9
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.
- checksums.yaml +8 -8
- data/lib/pullentity-client/generate/auth.rb +8 -0
- data/lib/pullentity-client/helpers.rb +61 -27
- data/lib/pullentity-client/templates/defaults/config.erb +0 -1
- data/lib/pullentity-client/version.rb +1 -1
- data/vendor/assets/stylesheets/pullentity.css.scss.erb +0 -0
- metadata +3 -3
- data/vendor/assets/stylesheets/pullentity.css.scss +0 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,15 +1,15 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            !binary "U0hBMQ==":
         | 
| 3 3 | 
             
              metadata.gz: !binary |-
         | 
| 4 | 
            -
                 | 
| 4 | 
            +
                ZTJiZDY3OWY5MWZiNzFmYzZmYjYxOWZhMjFkMmY3Y2VhNjYxZGVjMQ==
         | 
| 5 5 | 
             
              data.tar.gz: !binary |-
         | 
| 6 | 
            -
                 | 
| 6 | 
            +
                ZTQ4M2M0NWQyZjdkOWM1M2Y1NzM4ZWI4OGNmMTVlYjE0MTRhODY3Mw==
         | 
| 7 7 | 
             
            !binary "U0hBNTEy":
         | 
| 8 8 | 
             
              metadata.gz: !binary |-
         | 
| 9 | 
            -
                 | 
| 10 | 
            -
                 | 
| 11 | 
            -
                 | 
| 9 | 
            +
                MTMwNTQzNDk5ODg2ZmRkMzE4ZDljNjQ3N2E1OGI0MjhlNjAzMmJmNTRmNjIz
         | 
| 10 | 
            +
                ZTM1MTNkNDk2YjZiMTliODljMmU5NDA5Yjg3MTFjZTk2ODVhYTU0NWVlODg4
         | 
| 11 | 
            +
                MjJlYTI4MzU0MDEzOWM4YjU1Mzg5N2MzYTE0Njc4YTgzMzM0ZTM=
         | 
| 12 12 | 
             
              data.tar.gz: !binary |-
         | 
| 13 | 
            -
                 | 
| 14 | 
            -
                 | 
| 15 | 
            -
                 | 
| 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 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 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 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 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 | 
            -
             | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 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 | 
            -
             | 
| 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 | 
            -
                 | 
| 44 | 
            -
             | 
| 45 | 
            -
             | 
| 46 | 
            -
                  else
         | 
| 47 | 
            -
                    super
         | 
| 48 | 
            -
                  end
         | 
| 49 | 
            -
                end
         | 
| 50 | 
            -
             | 
| 82 | 
            +
                alias :included :registered
         | 
| 83 | 
            +
              end
         | 
| 84 | 
            +
            end
         | 
| 51 85 |  | 
| 52 | 
            -
             | 
| 86 | 
            +
            ::Middleman::Extensions.register(:pullentity_config, Pullentity::Client::MiddlemanConfig)
         | 
| 
            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. | 
| 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- | 
| 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: []
         | 
| @@ -1 +0,0 @@ | |
| 1 | 
            -
             |