pakyow 0.11.3 → 1.0.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE +3 -19
  3. data/README.md +96 -23
  4. data/lib/pakyow/all.rb +12 -0
  5. data/lib/pakyow/version.rb +5 -1
  6. metadata +49 -98
  7. data/bin/pakyow +0 -4
  8. data/lib/generators/pakyow/app/app_generator.rb +0 -93
  9. data/lib/generators/pakyow/app/templates/Gemfile +0 -18
  10. data/lib/generators/pakyow/app/templates/README.md +0 -28
  11. data/lib/generators/pakyow/app/templates/Rakefile +0 -3
  12. data/lib/generators/pakyow/app/templates/app/lib/bindings.rb +0 -3
  13. data/lib/generators/pakyow/app/templates/app/lib/helpers.rb +0 -3
  14. data/lib/generators/pakyow/app/templates/app/lib/routes.rb +0 -7
  15. data/lib/generators/pakyow/app/templates/app/setup.rb +0 -24
  16. data/lib/generators/pakyow/app/templates/app/views/_templates/default.html +0 -33
  17. data/lib/generators/pakyow/app/templates/app/views/index.html +0 -96
  18. data/lib/generators/pakyow/app/templates/config.ru +0 -5
  19. data/lib/generators/pakyow/app/templates/env +0 -1
  20. data/lib/generators/pakyow/app/templates/env.example +0 -3
  21. data/lib/generators/pakyow/app/templates/gitignore +0 -8
  22. data/lib/generators/pakyow/app/templates/public/apple-touch-icon-precomposed.png +0 -0
  23. data/lib/generators/pakyow/app/templates/public/apple-touch-icon.png +0 -0
  24. data/lib/generators/pakyow/app/templates/public/favicon.ico +0 -0
  25. data/lib/generators/pakyow/app/templates/public/scripts/ring/LICENSE +0 -20
  26. data/lib/generators/pakyow/app/templates/public/scripts/ring/components/fastlink.js +0 -14
  27. data/lib/generators/pakyow/app/templates/public/scripts/ring/components/fastlink.min.js +0 -1
  28. data/lib/generators/pakyow/app/templates/public/scripts/ring/components/ga.js +0 -34
  29. data/lib/generators/pakyow/app/templates/public/scripts/ring/components/ga.min.js +0 -1
  30. data/lib/generators/pakyow/app/templates/public/scripts/ring/components/loader.js +0 -9
  31. data/lib/generators/pakyow/app/templates/public/scripts/ring/components/loader.min.js +0 -1
  32. data/lib/generators/pakyow/app/templates/public/scripts/ring/components/modal.js +0 -98
  33. data/lib/generators/pakyow/app/templates/public/scripts/ring/components/modal.min.js +0 -1
  34. data/lib/generators/pakyow/app/templates/public/scripts/ring/components/mutable.js +0 -70
  35. data/lib/generators/pakyow/app/templates/public/scripts/ring/components/mutable.min.js +0 -1
  36. data/lib/generators/pakyow/app/templates/public/scripts/ring/components/navigator.js +0 -154
  37. data/lib/generators/pakyow/app/templates/public/scripts/ring/components/navigator.min.js +0 -1
  38. data/lib/generators/pakyow/app/templates/public/scripts/ring/components/notifier.js +0 -29
  39. data/lib/generators/pakyow/app/templates/public/scripts/ring/components/notifier.min.js +0 -1
  40. data/lib/generators/pakyow/app/templates/public/scripts/ring/pakyow.js +0 -1936
  41. data/lib/generators/pakyow/app/templates/public/scripts/ring/pakyow.min.js +0 -1
  42. data/lib/generators/pakyow/app/templates/public/styles/pakyow-css/LICENSE +0 -20
  43. data/lib/generators/pakyow/app/templates/public/styles/pakyow-css/VERSION +0 -1
  44. data/lib/generators/pakyow/app/templates/public/styles/pakyow-css/reset.css +0 -2
  45. data/lib/generators/pakyow/app/templates/public/styles/pakyow-css/structure.css +0 -2
  46. data/lib/generators/pakyow/app/templates/public/styles/pakyow-css/syntax.css +0 -2
  47. data/lib/generators/pakyow/app/templates/public/styles/pakyow-css/theme.css +0 -2
  48. data/lib/generators/pakyow/app/templates/rspec +0 -3
  49. data/lib/generators/pakyow/app/templates/spec/integration/app_spec.rb +0 -17
  50. data/lib/generators/pakyow/app/templates/spec/spec_helper.rb +0 -7
  51. data/lib/pakyow.rb +0 -12
  52. data/lib/pakyow/command_line_interface.rb +0 -79
  53. data/lib/pakyow/commands/console.rb +0 -27
  54. data/lib/pakyow/commands/console_methods.rb +0 -10
  55. data/lib/pakyow/commands/server.rb +0 -38
data/bin/pakyow DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "pakyow/command_line_interface"
4
- Pakyow::CommandLineInterface.start
@@ -1,93 +0,0 @@
1
- require 'erb'
2
- require 'fileutils'
3
- require 'securerandom'
4
- require 'pakyow/version.rb'
5
-
6
- module Pakyow
7
- module Generators
8
- class AppGenerator
9
- class << self
10
- def start(destination)
11
- generator = self.new(destination)
12
- generator.build
13
- end
14
- end
15
-
16
- FILENAME_TRANSLATIONS = {
17
- 'rspec' => '.rspec',
18
- 'gitignore' => '.gitignore',
19
- 'env' => '.env',
20
- 'env.example' => '.env.example'
21
- }
22
-
23
- def initialize(dest)
24
- @src = "#{File.expand_path('../', __FILE__)}/templates/."
25
- @dest = dest
26
- end
27
-
28
- def build
29
- puts "Generating project: #{@dest}"
30
-
31
- if !File.directory?(@dest) || (Dir.entries(@dest) - ['.', '..']).empty?
32
- copy
33
- else
34
- ARGV.clear
35
- print "The folder '#{@dest}' is in use. Would you like to populate it anyway? [Yn] "
36
-
37
- if gets.chomp! == 'Y'
38
- copy
39
- else
40
- puts "Aborted!"
41
- exit
42
- end
43
- end
44
-
45
- exec
46
- puts "Done! Run `cd #{@dest}; bundle exec pakyow server` to get started!"
47
- end
48
-
49
- protected
50
-
51
- def copy
52
- FileUtils.mkdir(@dest) unless File.exists?(@dest)
53
-
54
- Dir.glob(File.join(@src, '**', '*')).each do |path|
55
- relative_path = path[@src.length..-1]
56
- generated_path = File.join(@dest, File.dirname(relative_path), translated_filename(File.basename(relative_path)))
57
-
58
- if File.directory?(path)
59
- FileUtils.mkdir(generated_path)
60
- next
61
- end
62
-
63
- erb = ERB.new(File.read(path))
64
- File.open(generated_path, 'w') { |f| f.write(erb.result(binding)) }
65
- end
66
- end
67
-
68
- def exec
69
- FileUtils.cd(@dest) do
70
- puts "Running `bundle install` in #{Dir.pwd}"
71
- system("bundle install --binstubs")
72
- end
73
- end
74
-
75
- def generating_locally?
76
- local_pakyow = Gem::Specification.sort_by{ |g| [g.name.downcase, g.version] }.group_by{ |g| g.name }.detect{|k,v| k == 'pakyow'}
77
- !local_pakyow || local_pakyow.last.last.version < Gem::Version.new(Pakyow::VERSION)
78
- end
79
-
80
- def translated_filename(filename)
81
- FILENAME_TRANSLATIONS.fetch(filename, filename)
82
- end
83
-
84
- def generate_session_secret
85
- SecureRandom.hex(64)
86
- end
87
-
88
- def app_name
89
- File.basename(@dest)
90
- end
91
- end
92
- end
93
- end
@@ -1,18 +0,0 @@
1
- source 'https://rubygems.org'
2
- <% if generating_locally? %>
3
- gem 'pakyow', github: 'pakyow/pakyow'
4
- <% else %>
5
- gem 'pakyow', '~> <%= Pakyow::VERSION %>'
6
- <% end %>
7
- # app server
8
- gem 'puma', platforms: :ruby
9
- gem 'thin', platforms: :mswin
10
-
11
- # use dotenv to load environment variables
12
- gem 'dotenv'
13
-
14
- group :test do
15
- gem 'rspec'
16
- end
17
-
18
- # your gems here
@@ -1,28 +0,0 @@
1
- This is a Pakyow v0.10 project.
2
-
3
- # Getting Started
4
-
5
- Start the server:
6
-
7
- `bundle exec pakyow server`
8
-
9
- You'll find your app running at [http://localhost:3000](http://localhost:3000)!
10
-
11
- Need to interact with your code? Fire up a console:
12
-
13
- `bundle exec pakyow console`
14
-
15
- # Next Steps
16
-
17
- The following resources might be handy:
18
-
19
- - [Website](http://pakyow.org)
20
- - [Docs](http://pakyow.org/docs)
21
- - [Code](http://github.com/pakyow/pakyow)
22
-
23
- Want to keep up with the latest development? Follow along:
24
-
25
- - [Blog](http://pakyow.org/blog)
26
- - [Forums](http://forums.pakyow.org)
27
- - [Gitter](https://gitter.im/pakyow/chat)
28
- - [Twitter](http://twitter.com/pakyow)
@@ -1,3 +0,0 @@
1
- require 'pakyow-rake'
2
-
3
- # put your rake task here
@@ -1,3 +0,0 @@
1
- Pakyow::App.bindings do
2
- # define bindings here
3
- end
@@ -1,3 +0,0 @@
1
- module Pakyow::Helpers
2
- # define methods here that are available from routes, bindings, etc
3
- end
@@ -1,7 +0,0 @@
1
- Pakyow::App.routes do
2
- default do
3
- logger.info 'hello'
4
- end
5
-
6
- # define application routes here
7
- end
@@ -1,24 +0,0 @@
1
- require 'bundler/setup'
2
- require 'pakyow'
3
-
4
- Pakyow::App.define do
5
- configure do
6
- Bundler.require :default, Pakyow::Config.env
7
-
8
- if defined?(Dotenv)
9
- env_path = ".env.#{Pakyow::Config.env}"
10
- Dotenv.load env_path if File.exist?(env_path)
11
- Dotenv.load
12
- end
13
-
14
- app.name = '<%= app_name %>'
15
- end
16
-
17
- configure :development do
18
- # development config goes here
19
- end
20
-
21
- configure :production do
22
- # production config goes here
23
- end
24
- end
@@ -1,33 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>
5
- <%= app_name %>
6
- </title>
7
-
8
- <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0" name="viewport">
9
-
10
- <link rel="stylesheet" type="text/css" href="/styles/pakyow-css/reset.css">
11
- <link rel="stylesheet" type="text/css" href="/styles/pakyow-css/structure.css">
12
- <link rel="stylesheet" type="text/css" href="/styles/pakyow-css/syntax.css">
13
- <link rel="stylesheet" type="text/css" href="/styles/pakyow-css/theme.css">
14
-
15
- <script src="/scripts/ring/pakyow.js"></script>
16
-
17
- <meta charset="UTF-8">
18
- </head>
19
-
20
- <body>
21
- <main class="container-1">
22
- <!-- @container -->
23
- </main>
24
-
25
- <footer class="container-1 margin-t">
26
- <p>
27
- Built with
28
- <svg class="icon" width="10" height="10" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M896 1664q-26 0-44-18l-624-602q-10-8-27.5-26t-55.5-65.5-68-97.5-53.5-121-23.5-138q0-220 127-344t351-124q62 0 126.5 21.5t120 58 95.5 68.5 76 68q36-36 76-68t95.5-68.5 120-58 126.5-21.5q224 0 351 124t127 344q0 221-229 450l-623 600q-18 18-44 18z"></svg>
29
- and <a href="http://pakyow.org">Pakyow</a>.
30
- </p>
31
- </footer>
32
- </body>
33
- </html>
@@ -1,96 +0,0 @@
1
- <h1>
2
- Welcome to Pakyow :)
3
- </h1>
4
-
5
- <p class="lead margin-t">
6
- The following links might be handy:
7
- </p>
8
-
9
- <ul>
10
- <li>
11
- <a href="http://pakyow.org/">Official Website</a>
12
- </li>
13
-
14
- <li>
15
- <a href="http://pakyow.org/docs">Guides &amp; Documentation</a>
16
- </li>
17
-
18
- <li>
19
- <a href="http://github.com/pakyow/pakyow">Source Code</a>
20
- </li>
21
- </ul>
22
-
23
- <h3 class="margin-t">
24
- Show Your Support
25
- </h3>
26
-
27
- <p>
28
- Give us a star on <a href="http://github.com/pakyow">Github</a>. But don't
29
- stop there &ndash; tell your friends about the project! Writing blog posts,
30
- giving talks to local user groups, and screencasting your experiences with
31
- Pakyow all help spread the word. We'll return the favor by helping promote
32
- the things you create. Also consider adding a link back to pakyow.org from your
33
- project.
34
- </p>
35
-
36
- <ul class="plain social-links inline margin-t">
37
- <li>
38
- <iframe src="https://ghbtns.com/github-btn.html?user=pakyow&repo=pakyow&type=star&count=true&v=2" frameborder="0" scrolling="0" width="85px" height="20px"></iframe>
39
- </li>
40
-
41
- <li>
42
- <a href="https://twitter.com/pakyow" class="twitter-follow-button" data-show-count="false">Follow @pakyow</a>
43
- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
44
- </li>
45
-
46
- <li>
47
- <div id="fb-root"></div>
48
- <script>(function(d, s, id) {
49
- var js, fjs = d.getElementsByTagName(s)[0];
50
- if (d.getElementById(id)) return;
51
- js = d.createElement(s); js.id = id;
52
- js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3&appId=1611480632444271";
53
- fjs.parentNode.insertBefore(js, fjs);
54
- }(document, 'script', 'facebook-jssdk'));</script>
55
- <div class="fb-like" data-href="https://www.facebook.com/pakyow.rb" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div>
56
- </li>
57
-
58
- <li>
59
- <!-- Place this tag in your head or just before your close body tag. -->
60
- <script src="https://apis.google.com/js/platform.js" async defer></script>
61
- <!-- Place this tag where you want the +1 button to render. -->
62
- <div class="g-plusone" data-size="medium" data-href="http://pakyow.org"></div>
63
- </li>
64
- </ul>
65
-
66
- <div style="clear:both"></div>
67
-
68
- <h3 class="margin-t">
69
- Join the Conversation
70
- </h3>
71
-
72
- <p>
73
- Come hang out on our <a href="https://gitter.im/pakyow/chat">Gitter channel</a>,
74
- which took the place of our IRC channel in 2015. You should also join the
75
- <a href="http://forums.pakyow.org">forums</a>, where early discussions about new Pakyow features often take place.
76
- Don't forget to lend a hand &ndash; ask and answer <a href="http://stackoverflow.com/questions/tagged/pakyow">questions on Stack Overflow</a>.
77
- </p>
78
-
79
- <h3 class="margin-t">
80
- Contribute to the Project
81
- </h3>
82
-
83
- <p>
84
- We'd love your contributions to Pakyow code or documentation. Everything is hosted publicly on <a href="http://github.com/pakyow">Github</a>.
85
- Looking through the list of open issues would be a great place to start. If you need more direction, jump on
86
- one of the communication channels listed above; we're happy to help!
87
- </p>
88
-
89
- <h3 class="margin-t">
90
- Report Problems you Encounter
91
- </h3>
92
-
93
- <p>
94
- Found a bug or have an idea for a new feature?
95
- Open up an issue on our <a href="https://github.com/pakyow/pakyow/issues">Github issues page</a>.
96
- </p>
@@ -1,5 +0,0 @@
1
- require File.expand_path('../app/setup', __FILE__)
2
-
3
- app = Pakyow::App
4
- app.builder.run(app.stage(ENV['APP_ENV'] || ENV['RACK_ENV']))
5
- run app.builder.to_app
@@ -1 +0,0 @@
1
- SESSION_SECRET=<%= generate_session_secret %>
@@ -1,3 +0,0 @@
1
- # Please place the following environment variables in your local `.env` file.
2
-
3
- SESSION_SECRET=sekret
@@ -1,8 +0,0 @@
1
- # ignore bundler config
2
- .bundle
3
-
4
- # ignore environment files
5
- .env*
6
-
7
- # ignore binstubs
8
- bin
@@ -1,20 +0,0 @@
1
- Copyright (c) 2015 Bryan Powell
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.
@@ -1,14 +0,0 @@
1
- pw.component.register('fastlink', function (view, config) {
2
- if (window.history) {
3
- view.node.addEventListener('click', function (evt) {
4
- // don't break open in new tab!
5
- if (evt.metaKey || evt.ctrlKey) return;
6
-
7
- evt.preventDefault();
8
- window.history.pushState({ uri: this.href }, this.href, this.href);
9
- return false;
10
- });
11
- } else {
12
- // unsupported
13
- }
14
- });
@@ -1 +0,0 @@
1
- pw.component.register("fastlink",function(t,e){window.history&&t.node.addEventListener("click",function(t){return t.metaKey||t.ctrlKey?void 0:(t.preventDefault(),window.history.pushState({uri:this.href},this.href,this.href),!1)})});
@@ -1,34 +0,0 @@
1
- /*
2
- Ring.js - Google Analytics Component
3
-
4
- Sets up Google Analytics and tracks the immediate pageview along with any
5
- pageviews that occur over a WebSocket connection with Navigator. To use,
6
- attach the component to the <body> tag and configure the trackingId:
7
-
8
- <body data-ui="ga" data-config="trackingId: yourTrackingIdHere">
9
-
10
- It will automatically ignore pageviews that occur locally.
11
- */
12
-
13
- pw.component.register('ga', function (view, config) {
14
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
15
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
16
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
17
- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
18
- ga('create', config.trackingId, 'auto');
19
-
20
- this.track = function (uri) {
21
- if (document.domain.indexOf('local') != -1) {
22
- return;
23
- }
24
-
25
- ga('send', 'pageview', uri);
26
- };
27
-
28
- this.listen('navigator:change', function (payload) {
29
- this.track(payload.uri);
30
- });
31
-
32
- // track the current pageview
33
- this.track(location.pathname);
34
- });
@@ -1 +0,0 @@
1
- pw.component.register("ga",function(t,n){!function(t,n,e,a,c,i,o){t.GoogleAnalyticsObject=c,t[c]=t[c]||function(){(t[c].q=t[c].q||[]).push(arguments)},t[c].l=1*new Date,i=n.createElement(e),o=n.getElementsByTagName(e)[0],i.async=1,i.src=a,o.parentNode.insertBefore(i,o)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),ga("create",n.trackingId,"auto"),this.track=function(t){-1==document.domain.indexOf("local")&&ga("send","pageview",t)},this.listen("navigator:change",function(t){this.track(t.uri)}),this.track(location.pathname)});