helix-rails 0.5.0.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/Gemfile +3 -0
- data/helix-rails.gemspec +22 -0
- data/lib/generators/helix/add_crate_generator.rb +14 -0
- data/lib/generators/helix/install_generator.rb +9 -0
- data/lib/helix-rails.rb +1 -0
- data/lib/helix/rails.rb +1 -0
- data/lib/helix_runtime/rails.rb +8 -0
- data/lib/helix_runtime/rails/check_outdated.rb +16 -0
- data/lib/helix_runtime/rails/railtie.rb +23 -0
- data/lib/helix_runtime/rails/version.rb +5 -0
- metadata +96 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1d4e6dda16b817ae4472732e1749ba3fd7c7cc7d
|
4
|
+
data.tar.gz: e9c7c3461145f9ad372334b961b3d8845d428074
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4ccdda4c90d46154c2b8b400d076e3b78f6edeb72916c45a9a3f28b20d0af899a1b090842dc29ee8b50b949c1ac9fc264f5d115af72c2f7a3affaf672bb7e114
|
7
|
+
data.tar.gz: c948d39c9cc310b1fcd3efb5a2363ce008a8adf1ab16f3bedf4baa731f4fa8488a282ffceb15422edd5bf2046c90325be5457d4471694fd215685521a0cb6179
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Gemfile.lock
|
data/Gemfile
ADDED
data/helix-rails.gemspec
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'helix_runtime/rails/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "helix-rails"
|
8
|
+
spec.version = HelixRuntime::Rails::VERSION
|
9
|
+
spec.authors = ["Peter Wagenet"]
|
10
|
+
spec.email = ["peter.wagenet@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Helix for Rails}
|
13
|
+
spec.homepage = "https://github.com/tildeio/helix-rails"
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
16
|
+
spec.require_paths = ["lib"]
|
17
|
+
|
18
|
+
spec.add_dependency "helix_runtime", ">= 0.5.0.alpha.2"
|
19
|
+
spec.add_dependency "rails", ">= 4.0"
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
22
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'helix_runtime/cli'
|
2
|
+
|
3
|
+
# This should really be HelixRuntime, but we want nicer naming
|
4
|
+
module Helix
|
5
|
+
class AddCrateGenerator < Rails::Generators::Base
|
6
|
+
desc "add Helix crate"
|
7
|
+
argument :name, :type => :string
|
8
|
+
|
9
|
+
def add_crate
|
10
|
+
cli = HelixRuntime::CLI::Base.new
|
11
|
+
cli.invoke(:add_crate, [name], skip_bundle: true)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# This should really be HelixRuntime, but we want nicer naming
|
2
|
+
module Helix
|
3
|
+
class InstallGenerator < Rails::Generators::Base
|
4
|
+
desc "install Helix"
|
5
|
+
def configure_application
|
6
|
+
application("config.helix.outdated_error = :page_load", env: :development)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
data/lib/helix-rails.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'helix_runtime/rails'
|
data/lib/helix/rails.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'helix_runtime/rails'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'helix_runtime/rails/check_outdated'
|
2
|
+
|
3
|
+
module HelixRuntime
|
4
|
+
module Rails
|
5
|
+
class Railtie < ::Rails::Railtie
|
6
|
+
config.helix = ActiveSupport::OrderedOptions.new
|
7
|
+
|
8
|
+
initializer "helix.build_check" do |app|
|
9
|
+
project = HelixRuntime::ParentProject.new(app.root)
|
10
|
+
|
11
|
+
# This will be added by the install generator, but people may forget to run it
|
12
|
+
if ::Rails.env.development? && !config.helix.key?(:outdated_error)
|
13
|
+
config.helix.outdated_error = :page_load
|
14
|
+
end
|
15
|
+
|
16
|
+
if config.helix.delete(:outdated_error) == :page_load
|
17
|
+
config.app_middleware.insert_after ::ActionDispatch::Callbacks,
|
18
|
+
HelixRuntime::Rails::CheckOutdated, project
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: helix-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.0.alpha.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Peter Wagenet
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-04-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: helix_runtime
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.5.0.alpha.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.5.0.alpha.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '4.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '4.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.10'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.10'
|
55
|
+
description:
|
56
|
+
email:
|
57
|
+
- peter.wagenet@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- Gemfile
|
64
|
+
- helix-rails.gemspec
|
65
|
+
- lib/generators/helix/add_crate_generator.rb
|
66
|
+
- lib/generators/helix/install_generator.rb
|
67
|
+
- lib/helix-rails.rb
|
68
|
+
- lib/helix/rails.rb
|
69
|
+
- lib/helix_runtime/rails.rb
|
70
|
+
- lib/helix_runtime/rails/check_outdated.rb
|
71
|
+
- lib/helix_runtime/rails/railtie.rb
|
72
|
+
- lib/helix_runtime/rails/version.rb
|
73
|
+
homepage: https://github.com/tildeio/helix-rails
|
74
|
+
licenses: []
|
75
|
+
metadata: {}
|
76
|
+
post_install_message:
|
77
|
+
rdoc_options: []
|
78
|
+
require_paths:
|
79
|
+
- lib
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.3.1
|
90
|
+
requirements: []
|
91
|
+
rubyforge_project:
|
92
|
+
rubygems_version: 2.6.11
|
93
|
+
signing_key:
|
94
|
+
specification_version: 4
|
95
|
+
summary: Helix for Rails
|
96
|
+
test_files: []
|