answers 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 38fdf3cab16ba71de68f7c581b219d0c8bd5b292
4
+ data.tar.gz: 94fb5778825fb74a135e68f14e9c09ce4edb0d0b
5
+ SHA512:
6
+ metadata.gz: e1063d23bcce7711d9aa4d5fadb2b1fea22c5fa103dbffd5cdf4826a4ff8037a9cb72950928e243b9d112ff3dc81b239da168bb208bb73396adafcc58caef80e
7
+ data.tar.gz: 83c7e10f75a332166c8ad5981c3cae6505790010497cdeb908616f3105cf88b5ed19148857f249d7e3995a5fc4c1d94ac6e98644729e973f322dbefc2124b308
data/bin/answers ADDED
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env ruby
2
+ gem 'railties'
3
+ require 'rails/generators'
4
+ require 'rails/generators/rails/app/app_generator'
5
+ template_path = File.expand_path('../../templates/answers/installer.rb', __FILE__)
6
+
7
+ def show_help_message
8
+ puts "Usage:"
9
+ puts " answers APP_NAME [options]"
10
+ puts ""
11
+ puts "Options:"
12
+ # Support when running locally
13
+ relative_path = File.expand_path('../../core/lib/generators/answers/cms/cms_generator.rb', __FILE__)
14
+ if File.exist?(relative_path)
15
+ require relative_path
16
+ else
17
+ gem 'answers-core'
18
+ require 'generators/answers/cms/cms_generator'
19
+ end
20
+ Answers::CmsGenerator.class_options.each do |raw, option|
21
+ dasherized = "--#{option.name.to_s.gsub('_', '-')}"
22
+ dasherized = [option.aliases, "[#{dasherized}]"].flatten.join(', ') if option.aliases.any?
23
+ puts " #{dasherized}".ljust(28) << "# #{option.description}"
24
+ end
25
+ end
26
+
27
+ if ARGV.empty?
28
+ show_help_message
29
+ exit 0
30
+ end
31
+
32
+ case ARGV.first
33
+ when "-h", "--help"
34
+ show_help_message
35
+ exit 0
36
+ when "-v", "--version"
37
+ puts "Answers #{Gem.loaded_specs['answers'].version}"
38
+ exit 0
39
+ end
40
+
41
+ application_name = ARGV.shift
42
+
43
+ require 'pry'
44
+ require 'pry-nav'
45
+
46
+ result = Rails::Generators::AppGenerator.start [application_name, '-m', template_path, '--skip-test-unit'] | ARGV
47
+
48
+ if result && result.include?('Gemfile')
49
+ note = ["\n=== ACTION REQUIRED ==="]
50
+ note << "Now you can launch your webserver using:"
51
+ note << "\ncd #{application_name}"
52
+ note << "rails server"
53
+ note << "\nThis will launch the built-in webserver at port 3000."
54
+ note << "You can now see Answers running in your browser at http://localhost:3000"
55
+
56
+ if ARGV.include?('--heroku')
57
+ note << "\nIf you want files and images to work on Heroku, you will need to setup S3:"
58
+ note << "heroku config:add S3_BUCKET=XXXXXXXXX S3_KEY=XXXXXXXXX S3_SECRET=XXXXXXXXXX S3_REGION=XXXXXXXXXX"
59
+ end
60
+
61
+ note << "\nThanks for installing Answers, we hope you enjoy crafting your application!"
62
+ note << "---------\n\n"
63
+
64
+ puts note
65
+ end
@@ -0,0 +1,3 @@
1
+ %w(core).each do |extension|
2
+ require "answers-#{extension}"
3
+ end
@@ -0,0 +1,3 @@
1
+ module Answers
2
+ VERSION = "0.0.1"
3
+ end
data/lib/answers.rb ADDED
@@ -0,0 +1 @@
1
+ require 'answers/all'
@@ -0,0 +1,51 @@
1
+ require 'rbconfig'
2
+ VERSION_BAND = '0.0'
3
+ MINOR_VERSION_BAND = '0.0.5'
4
+
5
+ # We want to ensure that you have an ExecJS runtime available!
6
+ begin
7
+ require 'execjs'
8
+ rescue LoadError
9
+ abort "ExecJS is not installed. Please re-start the installer after running:\ngem install execjs"
10
+ end
11
+
12
+ if File.read("#{destination_root}/Gemfile") !~ /assets.+coffee-rails/m
13
+ gem "coffee-rails", :group => :assets
14
+ end
15
+
16
+ append_file 'Gemfile', <<-GEMFILE
17
+ gem 'activeadmin', github: 'activeadmin'
18
+ gem 'answers'
19
+ # gem 'answers-admin', ['~> #{VERSION_BAND}', '>= #{MINOR_VERSION_BAND}']
20
+ # gem 'answers-guides', ['~> #{VERSION_BAND}', '>= #{MINOR_VERSION_BAND}']
21
+ # gem 'answers-choose-your-own-adventure', ['~> #{VERSION_BAND}', '>= #{MINOR_VERSION_BAND}']
22
+
23
+ # Answers Dependencies
24
+ gem 'acts-as-taggable-on'
25
+ gem 'breadcrumbs_on_rails'
26
+ gem 'cancancan', github: 'andypike/cancancan', branch: 'rspec3'
27
+ gem 'dalli'
28
+ gem 'devise', '~> 3.2.0'
29
+ gem 'meta-tags'
30
+ gem 'searchkick'
31
+ gem 'secure_headers'
32
+ gem 'simple_token_authentication'
33
+ GEMFILE
34
+
35
+ begin
36
+ require 'execjs'
37
+ ::ExecJS::Runtimes.autodetect
38
+ rescue
39
+ gsub_file 'Gemfile', "# gem 'therubyracer'", "gem 'therubyracer'"
40
+ end
41
+
42
+ run 'bundle install'
43
+ rake 'db:create'
44
+
45
+ generate "answers:cms --fresh-installation #{ARGV.join(' ')}"
46
+
47
+ say <<-SAY
48
+ ============================================================================
49
+ Your new Answers application is now installed and mounts at '/'
50
+ ============================================================================
51
+ SAY
metadata ADDED
@@ -0,0 +1,142 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: answers
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Nick Bristow
8
+ - Alan deLevie
9
+ - Justin Grevich
10
+ - Sasha Magee
11
+ - John Stone
12
+ - Ben Willman
13
+ - John P. Yuda
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+ date: 2014-09-16 00:00:00.000000000 Z
18
+ dependencies:
19
+ - !ruby/object:Gem::Dependency
20
+ name: bundler
21
+ requirement: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: 1.6.2
26
+ type: :runtime
27
+ prerelease: false
28
+ version_requirements: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: 1.6.2
33
+ - !ruby/object:Gem::Dependency
34
+ name: rake
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rails
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: 4.1.6
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: 4.1.6
61
+ - !ruby/object:Gem::Dependency
62
+ name: answers-core
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: rspec-rails
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: 3.1.0
82
+ type: :runtime
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: 3.1.0
89
+ - !ruby/object:Gem::Dependency
90
+ name: devise
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: 3.2.0
96
+ type: :runtime
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: 3.2.0
103
+ description: Generator and Engines for the Answers Platform
104
+ email:
105
+ - justin.grevich@gsa.gov
106
+ - amos.stone@gsa.gov
107
+ - alan.delevie@gsa.gov
108
+ executables:
109
+ - answers
110
+ extensions: []
111
+ extra_rdoc_files: []
112
+ files:
113
+ - bin/answers
114
+ - lib/answers.rb
115
+ - lib/answers/all.rb
116
+ - lib/answers/version.rb
117
+ - templates/answers/installer.rb
118
+ homepage: ''
119
+ licenses:
120
+ - Public Domain
121
+ metadata: {}
122
+ post_install_message:
123
+ rdoc_options: []
124
+ require_paths:
125
+ - lib
126
+ required_ruby_version: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ required_rubygems_version: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ version: '0'
136
+ requirements: []
137
+ rubyforge_project:
138
+ rubygems_version: 2.2.2
139
+ signing_key:
140
+ specification_version: 4
141
+ summary: The Answers gem
142
+ test_files: []