Class: Papers::Configuration
- Inherits:
-
Object
- Object
- Papers::Configuration
- Defined in:
- lib/papers/configuration.rb
Instance Attribute Summary collapse
-
#bower_components_path ⇒ Object
Returns the value of attribute bower_components_path.
-
#ignore_npm_dev_dependencies ⇒ Object
Returns the value of attribute ignore_npm_dev_dependencies.
-
#javascript_paths ⇒ Object
Returns the value of attribute javascript_paths.
-
#license_whitelist ⇒ Object
Returns the value of attribute license_whitelist.
-
#manifest_file ⇒ Object
Returns the value of attribute manifest_file.
-
#npm_package_json_path ⇒ Object
Returns the value of attribute npm_package_json_path.
-
#package_whitelist ⇒ Object
Returns the value of attribute package_whitelist.
-
#validate_bower_components ⇒ Object
Returns the value of attribute validate_bower_components.
-
#validate_gems ⇒ Object
Returns the value of attribute validate_gems.
-
#validate_javascript ⇒ Object
Returns the value of attribute validate_javascript.
-
#validate_npm_packages ⇒ Object
Returns the value of attribute validate_npm_packages.
-
#version_whitelisted_license ⇒ Object
Returns the value of attribute version_whitelisted_license.
-
#whitelist_javascript_paths ⇒ Object
Returns the value of attribute whitelist_javascript_paths.
Instance Method Summary collapse
- #ignore_npm_dev_dependencies? ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #validate_bower_components? ⇒ Boolean
- #validate_gems? ⇒ Boolean
- #validate_javascript? ⇒ Boolean
- #validate_npm_packages? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/papers/configuration.rb', line 20 def initialize @license_whitelist = [ 'MIT', 'BSD', 'Apache 2.0', 'Apache-2.0', 'LGPLv2.1', 'LGPLv3', 'Ruby', 'Manually Reviewed', 'Unlicensed', 'ISC' ] @package_whitelist = [] @version_whitelisted_license = nil @manifest_file = File.join(Dir.pwd, 'config', 'papers_manifest.yml') @validate_gems = true @validate_javascript = true @validate_bower_components = false @validate_npm_packages = false @ignore_npm_dev_dependencies = false @javascript_paths = [ File.join(Dir.pwd, 'app', 'assets', 'javascripts'), File.join(Dir.pwd, 'lib', 'assets', 'javascripts'), File.join(Dir.pwd, 'vendor', 'assets', 'javascripts') ] @whitelist_javascript_paths = [] @bower_components_path = File.join(Dir.pwd, 'vendor', 'assets', 'components') @npm_package_json_path = File.join(Dir.pwd, 'package.json') end |
Instance Attribute Details
#bower_components_path ⇒ Object
Returns the value of attribute bower_components_path.
17 18 19 |
# File 'lib/papers/configuration.rb', line 17 def bower_components_path @bower_components_path end |
#ignore_npm_dev_dependencies ⇒ Object
Returns the value of attribute ignore_npm_dev_dependencies.
13 14 15 |
# File 'lib/papers/configuration.rb', line 13 def ignore_npm_dev_dependencies @ignore_npm_dev_dependencies end |
#javascript_paths ⇒ Object
Returns the value of attribute javascript_paths.
15 16 17 |
# File 'lib/papers/configuration.rb', line 15 def javascript_paths @javascript_paths end |
#license_whitelist ⇒ Object
Returns the value of attribute license_whitelist.
3 4 5 |
# File 'lib/papers/configuration.rb', line 3 def license_whitelist @license_whitelist end |
#manifest_file ⇒ Object
Returns the value of attribute manifest_file.
7 8 9 |
# File 'lib/papers/configuration.rb', line 7 def manifest_file @manifest_file end |
#npm_package_json_path ⇒ Object
Returns the value of attribute npm_package_json_path.
18 19 20 |
# File 'lib/papers/configuration.rb', line 18 def npm_package_json_path @npm_package_json_path end |
#package_whitelist ⇒ Object
Returns the value of attribute package_whitelist.
5 6 7 |
# File 'lib/papers/configuration.rb', line 5 def package_whitelist @package_whitelist end |
#validate_bower_components ⇒ Object
Returns the value of attribute validate_bower_components.
11 12 13 |
# File 'lib/papers/configuration.rb', line 11 def validate_bower_components @validate_bower_components end |
#validate_gems ⇒ Object
Returns the value of attribute validate_gems.
9 10 11 |
# File 'lib/papers/configuration.rb', line 9 def validate_gems @validate_gems end |
#validate_javascript ⇒ Object
Returns the value of attribute validate_javascript.
10 11 12 |
# File 'lib/papers/configuration.rb', line 10 def validate_javascript @validate_javascript end |
#validate_npm_packages ⇒ Object
Returns the value of attribute validate_npm_packages.
12 13 14 |
# File 'lib/papers/configuration.rb', line 12 def validate_npm_packages @validate_npm_packages end |
#version_whitelisted_license ⇒ Object
Returns the value of attribute version_whitelisted_license.
4 5 6 |
# File 'lib/papers/configuration.rb', line 4 def version_whitelisted_license @version_whitelisted_license end |
#whitelist_javascript_paths ⇒ Object
Returns the value of attribute whitelist_javascript_paths.
16 17 18 |
# File 'lib/papers/configuration.rb', line 16 def whitelist_javascript_paths @whitelist_javascript_paths end |
Instance Method Details
#ignore_npm_dev_dependencies? ⇒ Boolean
74 75 76 |
# File 'lib/papers/configuration.rb', line 74 def ignore_npm_dev_dependencies? !!@ignore_npm_dev_dependencies end |
#validate_bower_components? ⇒ Boolean
66 67 68 |
# File 'lib/papers/configuration.rb', line 66 def validate_bower_components? !!@validate_bower_components end |
#validate_gems? ⇒ Boolean
58 59 60 |
# File 'lib/papers/configuration.rb', line 58 def validate_gems? !!@validate_gems end |
#validate_javascript? ⇒ Boolean
62 63 64 |
# File 'lib/papers/configuration.rb', line 62 def validate_javascript? !!@validate_javascript end |
#validate_npm_packages? ⇒ Boolean
70 71 72 |
# File 'lib/papers/configuration.rb', line 70 def validate_npm_packages? !!@validate_npm_packages end |