lando 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/Gemfile +18 -0
- data/Gemfile.lock +95 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +19 -0
- data/Rakefile +43 -0
- data/VERSION +1 -0
- data/bin/lando +8 -0
- data/lando.gemspec +94 -0
- data/lib/lando.rb +3 -0
- data/lib/lando/generator.rb +6 -0
- data/lib/lando/generator/application.rb +62 -0
- data/lib/lando/generator/command/create.rb +24 -0
- data/lib/lando/generator/command/ls.rb +22 -0
- data/lib/lando/generator/command/preview.rb +32 -0
- data/lib/lando/generator/command_helper.rb +21 -0
- data/lib/lando/version.rb +8 -0
- data/templates/coming-soon/example.html +440 -0
- data/templates/coming-soon/images/Browser.svg +103 -0
- data/templates/coming-soon/images/Modal.svg +112 -0
- data/templates/coming-soon/images/arrow.png +0 -0
- data/templates/coming-soon/images/background.png +0 -0
- data/templates/coming-soon/images/hero.jpg +0 -0
- data/templates/coming-soon/images/middleman.png +0 -0
- data/templates/coming-soon/images/mobile.svg +51 -0
- data/templates/coming-soon/index.html +440 -0
- data/templates/coming-soon/javascripts/all.js +0 -0
- data/templates/coming-soon/stylesheets/all.css +6 -0
- data/templates/coming-soon/stylesheets/normalize.css +376 -0
- data/templates/test/example.html +9 -0
- data/test/helper.rb +34 -0
- data/test/test_lando.rb +7 -0
- metadata +190 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 56ac3b15c25926fdacef3b91776d8d490b05de94
|
4
|
+
data.tar.gz: 4124289c432f6f594c988ad11f1e4054c266632c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 586a1ddaea67fcf173e7fbe4ab0fa1e29698da9d4c9bf72491af8d6fcfd2faa46e3aeebcc82f79eb43b7347d014f30bb2f0a0069475bde96c90fc441b2bfa61a
|
7
|
+
data.tar.gz: 59ce60333333a2f3f0f766f0a8f71c3758d012348758e296b0b2d5cf1b810a773b4cdb8a3863cf9b593620d4c84556addf6f503beb3e07bd9aadff827c78bb8f
|
data/.document
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
group :development do
|
9
|
+
gem "shoulda", ">= 0"
|
10
|
+
gem "rdoc", "~> 3.12"
|
11
|
+
gem "bundler", "~> 1.0"
|
12
|
+
gem "jeweler", "~> 2.0.1"
|
13
|
+
gem "simplecov", ">= 0"
|
14
|
+
gem "lando", :path => "."
|
15
|
+
end
|
16
|
+
|
17
|
+
gem 'slop', "~> 4.2.0"
|
18
|
+
gem 'colorize', "~> 0.7.7"
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
lando (0.2.0)
|
5
|
+
colorize (~> 0.7.7)
|
6
|
+
slop (~> 4.2.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: http://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activesupport (4.2.3)
|
12
|
+
i18n (~> 0.7)
|
13
|
+
json (~> 1.7, >= 1.7.7)
|
14
|
+
minitest (~> 5.1)
|
15
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
16
|
+
tzinfo (~> 1.1)
|
17
|
+
addressable (2.3.8)
|
18
|
+
builder (3.2.2)
|
19
|
+
colorize (0.7.7)
|
20
|
+
descendants_tracker (0.0.4)
|
21
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
22
|
+
docile (1.1.5)
|
23
|
+
faraday (0.9.1)
|
24
|
+
multipart-post (>= 1.2, < 3)
|
25
|
+
git (1.2.9.1)
|
26
|
+
github_api (0.12.4)
|
27
|
+
addressable (~> 2.3)
|
28
|
+
descendants_tracker (~> 0.0.4)
|
29
|
+
faraday (~> 0.8, < 0.10)
|
30
|
+
hashie (>= 3.4)
|
31
|
+
multi_json (>= 1.7.5, < 2.0)
|
32
|
+
nokogiri (~> 1.6.6)
|
33
|
+
oauth2
|
34
|
+
hashie (3.4.2)
|
35
|
+
highline (1.7.3)
|
36
|
+
i18n (0.7.0)
|
37
|
+
jeweler (2.0.1)
|
38
|
+
builder
|
39
|
+
bundler (>= 1.0)
|
40
|
+
git (>= 1.2.5)
|
41
|
+
github_api
|
42
|
+
highline (>= 1.6.15)
|
43
|
+
nokogiri (>= 1.5.10)
|
44
|
+
rake
|
45
|
+
rdoc
|
46
|
+
json (1.8.3)
|
47
|
+
jwt (1.5.1)
|
48
|
+
mini_portile (0.6.2)
|
49
|
+
minitest (5.7.0)
|
50
|
+
multi_json (1.11.2)
|
51
|
+
multi_xml (0.5.5)
|
52
|
+
multipart-post (2.0.0)
|
53
|
+
nokogiri (1.6.6.2)
|
54
|
+
mini_portile (~> 0.6.0)
|
55
|
+
oauth2 (1.0.0)
|
56
|
+
faraday (>= 0.8, < 0.10)
|
57
|
+
jwt (~> 1.0)
|
58
|
+
multi_json (~> 1.3)
|
59
|
+
multi_xml (~> 0.5)
|
60
|
+
rack (~> 1.2)
|
61
|
+
rack (1.6.4)
|
62
|
+
rake (10.4.2)
|
63
|
+
rdoc (3.12.2)
|
64
|
+
json (~> 1.4)
|
65
|
+
shoulda (3.5.0)
|
66
|
+
shoulda-context (~> 1.0, >= 1.0.1)
|
67
|
+
shoulda-matchers (>= 1.4.1, < 3.0)
|
68
|
+
shoulda-context (1.2.1)
|
69
|
+
shoulda-matchers (2.8.0)
|
70
|
+
activesupport (>= 3.0.0)
|
71
|
+
simplecov (0.10.0)
|
72
|
+
docile (~> 1.1.0)
|
73
|
+
json (~> 1.8)
|
74
|
+
simplecov-html (~> 0.10.0)
|
75
|
+
simplecov-html (0.10.0)
|
76
|
+
slop (4.2.0)
|
77
|
+
thread_safe (0.3.5)
|
78
|
+
tzinfo (1.2.2)
|
79
|
+
thread_safe (~> 0.1)
|
80
|
+
|
81
|
+
PLATFORMS
|
82
|
+
ruby
|
83
|
+
|
84
|
+
DEPENDENCIES
|
85
|
+
bundler (~> 1.0)
|
86
|
+
colorize (~> 0.7.7)
|
87
|
+
jeweler (~> 2.0.1)
|
88
|
+
lando!
|
89
|
+
rdoc (~> 3.12)
|
90
|
+
shoulda
|
91
|
+
simplecov
|
92
|
+
slop (~> 4.2.0)
|
93
|
+
|
94
|
+
BUNDLED WITH
|
95
|
+
1.10.3
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2015 Jānis Kiršteins
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
= lando
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Contributing to lando
|
6
|
+
|
7
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
8
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
9
|
+
* Fork the project.
|
10
|
+
* Start a feature/bugfix branch.
|
11
|
+
* Commit and push until you are happy with your contribution.
|
12
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
+
|
15
|
+
== Copyright
|
16
|
+
|
17
|
+
Copyright (c) 2015 Jānis Kiršteins. See LICENSE.txt for
|
18
|
+
further details.
|
19
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
require 'lando/version'
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
17
|
+
gem.name = "lando"
|
18
|
+
gem.version = Lando::Version::STRING
|
19
|
+
gem.homepage = "http://github.com/montadigital/lando"
|
20
|
+
gem.license = "MIT"
|
21
|
+
gem.summary = "Tool for generating empty landing pages"
|
22
|
+
gem.description = "Lando generates empty landing pages, based on pre-made templates."
|
23
|
+
gem.email = "janis@montadigital.com"
|
24
|
+
gem.authors = ["Jānis Kiršteins"]
|
25
|
+
# dependencies defined in Gemfile
|
26
|
+
end
|
27
|
+
Jeweler::RubygemsDotOrgTasks.new
|
28
|
+
|
29
|
+
require 'rake/testtask'
|
30
|
+
Rake::TestTask.new(:test) do |test|
|
31
|
+
test.libs << 'lib' << 'test'
|
32
|
+
test.pattern = 'test/**/test_*.rb'
|
33
|
+
test.verbose = true
|
34
|
+
end
|
35
|
+
|
36
|
+
desc "Code coverage detail"
|
37
|
+
task :simplecov do
|
38
|
+
ENV['COVERAGE'] = "true"
|
39
|
+
Rake::Task['test'].execute
|
40
|
+
end
|
41
|
+
|
42
|
+
task :default => :test
|
43
|
+
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
data/bin/lando
ADDED
data/lando.gemspec
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: lando 0.2.0 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "lando"
|
9
|
+
s.version = "0.2.0"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib"]
|
13
|
+
s.authors = ["J\u{101}nis Kir\u{161}teins"]
|
14
|
+
s.date = "2015-08-04"
|
15
|
+
s.description = "Lando generates empty landing pages, based on pre-made templates."
|
16
|
+
s.email = "janis@montadigital.com"
|
17
|
+
s.executables = ["lando"]
|
18
|
+
s.extra_rdoc_files = [
|
19
|
+
"LICENSE.txt",
|
20
|
+
"README.rdoc"
|
21
|
+
]
|
22
|
+
s.files = [
|
23
|
+
".document",
|
24
|
+
"Gemfile",
|
25
|
+
"Gemfile.lock",
|
26
|
+
"LICENSE.txt",
|
27
|
+
"README.rdoc",
|
28
|
+
"Rakefile",
|
29
|
+
"VERSION",
|
30
|
+
"bin/lando",
|
31
|
+
"lando.gemspec",
|
32
|
+
"lib/lando.rb",
|
33
|
+
"lib/lando/generator.rb",
|
34
|
+
"lib/lando/generator/application.rb",
|
35
|
+
"lib/lando/generator/command/create.rb",
|
36
|
+
"lib/lando/generator/command/ls.rb",
|
37
|
+
"lib/lando/generator/command/preview.rb",
|
38
|
+
"lib/lando/generator/command_helper.rb",
|
39
|
+
"lib/lando/version.rb",
|
40
|
+
"templates/coming-soon/example.html",
|
41
|
+
"templates/coming-soon/images/Browser.svg",
|
42
|
+
"templates/coming-soon/images/Modal.svg",
|
43
|
+
"templates/coming-soon/images/arrow.png",
|
44
|
+
"templates/coming-soon/images/background.png",
|
45
|
+
"templates/coming-soon/images/hero.jpg",
|
46
|
+
"templates/coming-soon/images/middleman.png",
|
47
|
+
"templates/coming-soon/images/mobile.svg",
|
48
|
+
"templates/coming-soon/index.html",
|
49
|
+
"templates/coming-soon/javascripts/all.js",
|
50
|
+
"templates/coming-soon/stylesheets/all.css",
|
51
|
+
"templates/coming-soon/stylesheets/normalize.css",
|
52
|
+
"templates/test/example.html",
|
53
|
+
"test/helper.rb",
|
54
|
+
"test/test_lando.rb"
|
55
|
+
]
|
56
|
+
s.homepage = "http://github.com/montadigital/lando"
|
57
|
+
s.licenses = ["MIT"]
|
58
|
+
s.rubygems_version = "2.4.5"
|
59
|
+
s.summary = "Tool for generating empty landing pages"
|
60
|
+
|
61
|
+
if s.respond_to? :specification_version then
|
62
|
+
s.specification_version = 4
|
63
|
+
|
64
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
65
|
+
s.add_runtime_dependency(%q<slop>, ["~> 4.2.0"])
|
66
|
+
s.add_runtime_dependency(%q<colorize>, ["~> 0.7.7"])
|
67
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
68
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
69
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
70
|
+
s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
|
71
|
+
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
72
|
+
s.add_development_dependency(%q<lando>, [">= 0"])
|
73
|
+
else
|
74
|
+
s.add_dependency(%q<slop>, ["~> 4.2.0"])
|
75
|
+
s.add_dependency(%q<colorize>, ["~> 0.7.7"])
|
76
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
77
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
78
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
79
|
+
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
80
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
81
|
+
s.add_dependency(%q<lando>, [">= 0"])
|
82
|
+
end
|
83
|
+
else
|
84
|
+
s.add_dependency(%q<slop>, ["~> 4.2.0"])
|
85
|
+
s.add_dependency(%q<colorize>, ["~> 0.7.7"])
|
86
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
87
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
88
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
89
|
+
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
90
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
91
|
+
s.add_dependency(%q<lando>, [">= 0"])
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
data/lib/lando.rb
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'slop'
|
2
|
+
require 'colorize'
|
3
|
+
require 'lando/version'
|
4
|
+
|
5
|
+
Dir[File.dirname(__FILE__) + '/command/*.rb'].each do |f|
|
6
|
+
require f
|
7
|
+
end
|
8
|
+
|
9
|
+
module Lando
|
10
|
+
class Generator
|
11
|
+
class Lando::Generator::Application
|
12
|
+
class << self
|
13
|
+
def run!(*args)
|
14
|
+
opts = Slop.parse do |o|
|
15
|
+
|
16
|
+
o.banner =
|
17
|
+
%{lando is a landing page generator for Middleman.
|
18
|
+
|
19
|
+
Usage:
|
20
|
+
lando create <folder> <template>
|
21
|
+
Generate an empty landing page in the given folder, based on the specified
|
22
|
+
template.
|
23
|
+
|
24
|
+
NOTE: the folder must not already exist.
|
25
|
+
lando ls
|
26
|
+
List all available templates.
|
27
|
+
lando preview <template>
|
28
|
+
Open a preview (in the default Internet browser) of the specified template.
|
29
|
+
}
|
30
|
+
|
31
|
+
o.separator "Optional parameters:"
|
32
|
+
|
33
|
+
o.bool "-h", "--help", "print helpful information"
|
34
|
+
o.on '-v', '--version', 'print the version' do
|
35
|
+
puts "Version: #{Lando::Version::STRING}"
|
36
|
+
exit
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
args = opts.arguments.dup
|
41
|
+
|
42
|
+
if args.count > 0 && opts[:help] == false
|
43
|
+
cmd = args.shift
|
44
|
+
klass_name = "Lando::Generator::Command::#{cmd.capitalize}"
|
45
|
+
begin
|
46
|
+
cmd_handler_klass = Object.const_get(klass_name)
|
47
|
+
cmd_handler_klass.send('execute', *args)
|
48
|
+
exit
|
49
|
+
rescue NameError => e
|
50
|
+
STDERR.puts "Invalid command: #{cmd}: #{e.to_s}".red
|
51
|
+
rescue ArgumentError => e
|
52
|
+
STDERR.puts "Error: #{e.to_s}".red
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
puts opts.to_s(prefix: ' ')
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'lando/generator/command_helper'
|
2
|
+
|
3
|
+
module Lando
|
4
|
+
class Generator
|
5
|
+
module Command
|
6
|
+
class Create
|
7
|
+
extend CommandHelper
|
8
|
+
|
9
|
+
class << self
|
10
|
+
def execute(name = nil, template = nil)
|
11
|
+
require_nonblank('name', name)
|
12
|
+
require_nonblank('template', template)
|
13
|
+
|
14
|
+
raise ArgumentError.new "Directory '#{name}' already exists" if File.exist?(name)
|
15
|
+
assert_template_exists(template)
|
16
|
+
|
17
|
+
template_path = File.join templates_path, template
|
18
|
+
FileUtils.copy_entry template_path, name
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'lando/generator/command_helper'
|
2
|
+
|
3
|
+
module Lando
|
4
|
+
class Generator
|
5
|
+
module Command
|
6
|
+
class Ls
|
7
|
+
extend CommandHelper
|
8
|
+
|
9
|
+
class << self
|
10
|
+
def execute
|
11
|
+
template_dirs = Dir.glob("#{templates_path}/*").select {|f| File.directory? f}
|
12
|
+
|
13
|
+
template_dirs.each do |td|
|
14
|
+
puts File.basename td
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|