Commit 7c5a1816 by 陈雨佳

Initial commit

parents
# rails-assets-fetch
> The Bower package inside a gem
This gem was automatically generated. You can visit [rails-assets.org](https://rails-assets.org) for more information.
## Usage
Add rails-assets source block to your `Gemfile`:
```ruby
source "https://rails-assets.org" do
gem "rails-assets-fetch"
end
```
Then, import the asset using Sprockets’ `require` directive:
```js
//= require "fetch"
```
require 'bundler/gem_tasks'
//= require fetch/fetch.js
require "rails-assets-fetch/version"
module RailsAssetsFetch
def self.gem_path
Pathname(File.realpath(__FILE__)).join('../..')
end
def self.gem_spec
Gem::Specification::load(
gem_path.join("rails-assets-fetch.gemspec").to_s
)
end
def self.load_paths
gem_path.join('app/assets').each_child.to_a
end
def self.dependencies
[
]
end
if defined?(Rails)
class Engine < ::Rails::Engine
# Rails -> use app/assets directory.
end
end
end
class RailsAssets
@components ||= []
class << self
attr_accessor :components
def load_paths
components.flat_map(&:load_paths)
end
end
end
RailsAssets.components << RailsAssetsFetch
module RailsAssetsFetch
VERSION = "2.0.3"
end
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'rails-assets-fetch/version'
Gem::Specification.new do |spec|
spec.name = "rails-assets-fetch"
spec.version = RailsAssetsFetch::VERSION
spec.authors = ["rails-assets.org"]
spec.description = ""
spec.summary = ""
spec.homepage = "https://github.com/github/fetch"
spec.files = `find ./* -type f | cut -b 3-`.split($/)
spec.require_paths = ["lib"]
spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "rake"
end
{
"name": "rails-assets-fetch",
"downloads": null,
"version": "2.0.3",
"version_downloads": null,
"platform": "ruby",
"authors": "rails-assets.org",
"info": "",
"metadata": {
},
"sha": null,
"project_uri": "https://github.com/github/fetch",
"gem_uri": null,
"homepage_uri": "https://github.com/github/fetch",
"wiki_uri": null,
"documentation_uri": null,
"mailing_list_uri": null,
"source_code_uri": "https://github.com/github/fetch",
"bug_tracker_uri": null,
"dependencies": {
"development": [
],
"runtime": [
]
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment