yupi 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yupi/app_builder.rb +17 -17
- data/lib/yupi/version.rb +1 -1
- data/spec/features/new_project_spec.rb +1 -1
- data/templates/Gemfile.erb +2 -0
- data/templates/spec/spec_helper.rb +7 -1
- data/templates/views/application/{_analytics.html.erb → _analytics.html.haml} +3 -5
- data/templates/views/application/_flashes.html.haml +4 -0
- data/templates/views/application/_footer.html.haml +9 -0
- data/templates/views/application/_javascript.html.haml +8 -0
- data/templates/views/application/_navigation.html.haml +12 -0
- data/templates/views/application/_navigation_links.html.haml +2 -0
- data/templates/views/layouts/application.html.haml +23 -0
- data/templates/views/pages/home.html.haml +4 -0
- data/yupi.gemspec +1 -1
- metadata +20 -14
- data/templates/views/application/_flashes.html.erb +0 -6
- data/templates/views/application/_footer.html.erb +0 -17
- data/templates/views/application/_javascript.html.erb +0 -12
- data/templates/views/application/_navigation.html.erb +0 -18
- data/templates/views/application/_navigation_links.html.erb +0 -2
- data/templates/views/layouts/application.html.erb.erb +0 -43
- data/templates/views/pages/home.html.erb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 428147794641c0c091a2d2734782c270bd5741dc
|
4
|
+
data.tar.gz: fa71b93661ddb31106379aca9c5de04c156120e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55b045a30ae6c712674dca2d2cc3d6092dc792228d16a7e69c8ea103810dcf227418c0a5608fd79ec766ffcefc5bc4cbe56014fa5d3b6ba1e89a17423fde15c0
|
7
|
+
data.tar.gz: e046965ae2aef9f6578c46900313bb9362b078a083d99692ad96d09adc54b39e8d6452b71421df57b4c29ae322b1af8b18a890033a2ec86f32b2d21f7f1d49dd
|
data/lib/yupi/app_builder.rb
CHANGED
@@ -123,29 +123,29 @@ module Yupi
|
|
123
123
|
def create_partials
|
124
124
|
empty_directory 'app/views/application'
|
125
125
|
|
126
|
-
copy_file 'views/application/_flashes.html.
|
127
|
-
'app/views/application/_flashes.html.
|
128
|
-
copy_file 'views/application/_javascript.html.
|
129
|
-
'app/views/application/_javascript.html.
|
130
|
-
copy_file 'views/application/_navigation.html.
|
131
|
-
'app/views/application/_navigation.html.
|
132
|
-
copy_file 'views/application/_navigation_links.html.
|
133
|
-
'app/views/application/_navigation_links.html.
|
134
|
-
copy_file 'views/application/_analytics.html.
|
135
|
-
'app/views/application/_analytics.html.
|
136
|
-
copy_file 'views/application/_footer.html.
|
137
|
-
'app/views/application/_footer.html.
|
126
|
+
copy_file 'views/application/_flashes.html.haml',
|
127
|
+
'app/views/application/_flashes.html.haml'
|
128
|
+
copy_file 'views/application/_javascript.html.haml',
|
129
|
+
'app/views/application/_javascript.html.haml'
|
130
|
+
copy_file 'views/application/_navigation.html.haml',
|
131
|
+
'app/views/application/_navigation.html.haml'
|
132
|
+
copy_file 'views/application/_navigation_links.html.haml',
|
133
|
+
'app/views/application/_navigation_links.html.haml'
|
134
|
+
copy_file 'views/application/_analytics.html.haml',
|
135
|
+
'app/views/application/_analytics.html.haml'
|
136
|
+
copy_file 'views/application/_footer.html.haml',
|
137
|
+
'app/views/application/_footer.html.haml'
|
138
138
|
end
|
139
139
|
|
140
140
|
def create_home_page
|
141
|
-
copy_file 'views/pages/home.html.
|
142
|
-
'app/views/pages/home.html.
|
141
|
+
copy_file 'views/pages/home.html.haml',
|
142
|
+
'app/views/pages/home.html.haml'
|
143
143
|
end
|
144
144
|
|
145
145
|
def create_application_layout
|
146
|
-
|
147
|
-
|
148
|
-
|
146
|
+
remove_file 'app/views/layouts/application.html.erb'
|
147
|
+
copy_file 'views/layouts/application.html.haml',
|
148
|
+
'app/views/layouts/application.html.haml'
|
149
149
|
end
|
150
150
|
|
151
151
|
def use_postgres_config_template
|
data/lib/yupi/version.rb
CHANGED
data/templates/Gemfile.erb
CHANGED
@@ -7,6 +7,7 @@ gem "coffee-rails", "~> 4.1.0"
|
|
7
7
|
gem "delayed_job_active_record"
|
8
8
|
gem "email_validator"
|
9
9
|
gem "figaro"
|
10
|
+
gem "haml-rails"
|
10
11
|
gem "high_voltage"
|
11
12
|
gem "i18n-tasks"
|
12
13
|
gem "jquery-rails"
|
@@ -42,6 +43,7 @@ group :test do
|
|
42
43
|
gem "launchy"
|
43
44
|
gem "poltergeist"
|
44
45
|
gem "shoulda-matchers", require: false
|
46
|
+
gem "simplecov", require: false
|
45
47
|
gem "timecop"
|
46
48
|
gem "webmock"
|
47
49
|
end
|
@@ -1,18 +1,24 @@
|
|
1
|
+
if ENV.fetch("COVERAGE", false)
|
2
|
+
require "simplecov"
|
3
|
+
SimpleCov.start "rails"
|
4
|
+
end
|
5
|
+
|
1
6
|
require "webmock/rspec"
|
2
7
|
|
3
8
|
# http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
4
9
|
RSpec.configure do |config|
|
5
10
|
config.expect_with :rspec do |expectations|
|
11
|
+
expectations.syntax = :expect
|
6
12
|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
7
13
|
end
|
8
14
|
|
9
15
|
config.mock_with :rspec do |mocks|
|
16
|
+
mocks.syntax = :expect
|
10
17
|
mocks.verify_partial_doubles = true
|
11
18
|
end
|
12
19
|
|
13
20
|
config.filter_run :focus
|
14
21
|
config.run_all_when_everything_filtered = true
|
15
|
-
config.disable_monkey_patching!
|
16
22
|
|
17
23
|
if config.files_to_run.one?
|
18
24
|
config.default_formatter = 'doc'
|
@@ -1,7 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
- if ENV.key?("SEGMENT_KEY")
|
2
|
+
:javascript
|
3
3
|
window.analytics=window.analytics||[],window.analytics.methods=["identify","group","track","page","pageview","alias","ready","on","once","off","trackLink","trackForm","trackClick","trackSubmit"],window.analytics.factory=function(t){return function(){var a=Array.prototype.slice.call(arguments);return a.unshift(t),window.analytics.push(a),window.analytics}};for(var i=0;i<window.analytics.methods.length;i++){var key=window.analytics.methods[i];window.analytics[key]=window.analytics.factory(key)}window.analytics.load=function(t){if(!document.getElementById("analytics-js")){var a=document.createElement("script");a.type="text/javascript",a.id="analytics-js",a.async=!0,a.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n)}},window.analytics.SNIPPET_VERSION="2.0.9",
|
4
|
-
window.analytics.load("
|
4
|
+
window.analytics.load("#{ENV["SEGMENT_KEY"]}");
|
5
5
|
window.analytics.page();
|
6
|
-
</script>
|
7
|
-
<% end %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
%nav.navbar.navbar-default
|
2
|
+
.container
|
3
|
+
.navbar-header
|
4
|
+
%button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", :type => "button"}
|
5
|
+
%span.sr-only Toggle navigation
|
6
|
+
%span.icon-bar
|
7
|
+
%span.icon-bar
|
8
|
+
%span.icon-bar
|
9
|
+
= link_to 'Home', root_path, class: 'navbar-brand'
|
10
|
+
.collapse.navbar-collapse
|
11
|
+
%ul.nav.navbar-nav
|
12
|
+
= render 'navigation_links'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
!!!
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
|
5
|
+
%meta{:charset => "utf-8"}/
|
6
|
+
%meta{:content => "NOODP", :name => "ROBOTS"}/
|
7
|
+
%meta{:content => "initial-scale=1", :name => "viewport"}/
|
8
|
+
%title= title
|
9
|
+
= stylesheet_link_tag :application, media: "all"
|
10
|
+
= csrf_meta_tags
|
11
|
+
%body
|
12
|
+
#wrap
|
13
|
+
%header
|
14
|
+
= render 'navigation'
|
15
|
+
.container
|
16
|
+
.row
|
17
|
+
.col-sm-6.col-sm-offset-3.text-center
|
18
|
+
= render 'flashes'
|
19
|
+
.row
|
20
|
+
.col-sm-12
|
21
|
+
= yield
|
22
|
+
= render 'footer'
|
23
|
+
= render 'javascript'
|
data/yupi.gemspec
CHANGED
@@ -30,6 +30,6 @@ to build something amazing; don't use it if you like missing deadlines.
|
|
30
30
|
s.add_dependency 'bundler', '~> 1.3'
|
31
31
|
s.add_dependency 'rails', Yupi::RAILS_VERSION
|
32
32
|
|
33
|
-
s.add_development_dependency 'rspec', '
|
33
|
+
s.add_development_dependency 'rspec', '>= 3.2.0', '<4'
|
34
34
|
s.add_development_dependency 'capybara', '~> 2.2', '>= 2.2.0'
|
35
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yupi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- anadea
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -42,16 +42,22 @@ dependencies:
|
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 3.2.0
|
48
|
+
- - "<"
|
46
49
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
50
|
+
version: '4'
|
48
51
|
type: :development
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
51
54
|
requirements:
|
52
|
-
- - "
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 3.2.0
|
58
|
+
- - "<"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
60
|
+
version: '4'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: capybara
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,14 +137,14 @@ files:
|
|
131
137
|
- templates/spec/support/i18n.rb
|
132
138
|
- templates/tasks/bundler_audit.rake
|
133
139
|
- templates/tasks/development_seeds.rake
|
134
|
-
- templates/views/application/_analytics.html.
|
135
|
-
- templates/views/application/_flashes.html.
|
136
|
-
- templates/views/application/_footer.html.
|
137
|
-
- templates/views/application/_javascript.html.
|
138
|
-
- templates/views/application/_navigation.html.
|
139
|
-
- templates/views/application/_navigation_links.html.
|
140
|
-
- templates/views/layouts/application.html.
|
141
|
-
- templates/views/pages/home.html.
|
140
|
+
- templates/views/application/_analytics.html.haml
|
141
|
+
- templates/views/application/_flashes.html.haml
|
142
|
+
- templates/views/application/_footer.html.haml
|
143
|
+
- templates/views/application/_javascript.html.haml
|
144
|
+
- templates/views/application/_navigation.html.haml
|
145
|
+
- templates/views/application/_navigation_links.html.haml
|
146
|
+
- templates/views/layouts/application.html.haml
|
147
|
+
- templates/views/pages/home.html.haml
|
142
148
|
- yupi.gemspec
|
143
149
|
homepage: http://github.com/Anadea/yupi
|
144
150
|
licenses:
|
@@ -1,6 +0,0 @@
|
|
1
|
-
<% flash.each do |name, msg| %>
|
2
|
-
<div class="alert alert-<%= name == "notice" ? "success" : "danger" %>">
|
3
|
-
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
4
|
-
<%= content_tag :div, msg, :id => "flash_#{name}" %>
|
5
|
-
</div>
|
6
|
-
<% end %>
|
@@ -1,17 +0,0 @@
|
|
1
|
-
<div id="footer">
|
2
|
-
<div class="container">
|
3
|
-
|
4
|
-
<div class="row footer-first-row">
|
5
|
-
|
6
|
-
<div class="col-xs-12 text-center">
|
7
|
-
<p><small>
|
8
|
-
© <%= Time.now.year %> - Yourself!
|
9
|
-
<br/>
|
10
|
-
Assembled with <%= link_to "Yupi", "https://github.com/Anadea/yupi" %>
|
11
|
-
</small></p>
|
12
|
-
</div>
|
13
|
-
|
14
|
-
</div>
|
15
|
-
|
16
|
-
</div>
|
17
|
-
</div>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<nav class="navbar navbar-default">
|
2
|
-
<div class="container">
|
3
|
-
<div class="navbar-header">
|
4
|
-
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
5
|
-
<span class="sr-only">Toggle navigation</span>
|
6
|
-
<span class="icon-bar"></span>
|
7
|
-
<span class="icon-bar"></span>
|
8
|
-
<span class="icon-bar"></span>
|
9
|
-
</button>
|
10
|
-
<%= link_to 'Home', root_path, class: 'navbar-brand' %>
|
11
|
-
</div>
|
12
|
-
<div class="collapse navbar-collapse">
|
13
|
-
<ul class="nav navbar-nav">
|
14
|
-
<%= render 'navigation_links' %>
|
15
|
-
</ul>
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
</nav>
|
@@ -1,43 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8" />
|
5
|
-
<meta name="ROBOTS" content="NOODP" />
|
6
|
-
<meta name="viewport" content="initial-scale=1" />
|
7
|
-
<%%#
|
8
|
-
Configure default and controller-, and view-specific titles in
|
9
|
-
config/locales/en.yml. For more see:
|
10
|
-
https://github.com/calebthompson/title#usage
|
11
|
-
%>
|
12
|
-
<title><%%= title %></title>
|
13
|
-
<%%= stylesheet_link_tag :application, media: "all" %>
|
14
|
-
<%%= csrf_meta_tags %>
|
15
|
-
</head>
|
16
|
-
|
17
|
-
<body>
|
18
|
-
<div id="wrap">
|
19
|
-
<header>
|
20
|
-
<%%= render 'navigation' %>
|
21
|
-
</header>
|
22
|
-
|
23
|
-
<div class="container">
|
24
|
-
|
25
|
-
<div class="row">
|
26
|
-
<div class="col-sm-6 col-sm-offset-3 text-center">
|
27
|
-
<%%= render 'flashes' %>
|
28
|
-
</div>
|
29
|
-
</div>
|
30
|
-
|
31
|
-
<div class="row">
|
32
|
-
<div class="col-sm-12">
|
33
|
-
<%%= yield %>
|
34
|
-
</div>
|
35
|
-
</div>
|
36
|
-
|
37
|
-
</div>
|
38
|
-
</div>
|
39
|
-
|
40
|
-
<%%= render 'footer' %>
|
41
|
-
<%%= render 'javascript' %>
|
42
|
-
</body>
|
43
|
-
</html>
|
@@ -1 +0,0 @@
|
|
1
|
-
<h1><i class="fa fa-home"></i> Home Page <small>views/pages/home.html.erb</small></h1>
|