Permalink
Browse files

added

  • Loading branch information...
1 parent 1c12e67 commit 6fd95566c83103d72f5db389f48ced89dcf40d31 @komagata committed Nov 17, 2010
Showing with 148 additions and 0 deletions.
  1. +3 −0 .bundle/config
  2. +1 −0 .gitignore
  3. +9 −0 Gemfile
  4. +21 −0 Gemfile.lock
  5. +20 −0 LICENSE
  6. +28 −0 README.rdoc
  7. +26 −0 app.rb
  8. +5 −0 config.ru
  9. +2 −0 views/created.haml
  10. +2 −0 views/index.haml
  11. +29 −0 views/layout.haml
  12. +2 −0 views/style.sass
View
@@ -0,0 +1,3 @@
+---
+BUNDLE_DISABLE_SHARED_GEMS: "1"
+BUNDLE_PATH: bundle
View
@@ -0,0 +1 @@
+/bundle
View
@@ -0,0 +1,9 @@
+source :rubygems
+
+gem 'haml'
+gem 'sinatra'
+
+group :test do
+ gem 'shoulda'
+ gem 'rack-test'
+end
View
@@ -0,0 +1,21 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ haml (3.0.24)
+ rack (1.2.1)
+ rack-test (0.5.6)
+ rack (>= 1.0)
+ shoulda (2.11.3)
+ sinatra (1.1.0)
+ rack (~> 1.1)
+ tilt (~> 1.1)
+ tilt (1.1)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ haml
+ rack-test
+ shoulda
+ sinatra
View
@@ -0,0 +1,20 @@
+Copyright (c) 2010 Masaki Komagata
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -0,0 +1,28 @@
+= next-holiday
+
+Display next holiday in Japan.
+
+== INSTALLATION
+
+ $ gem install bundler --version "1.0.0"
+ $ git clone git://github.com/komagata/next-holiday.git
+ $ cd next-holiday
+ $ bundle install bundle --without test
+ $ bundle exec rackup
+
+View at: http://localhost:9292/
+
+== Note on Patches/Pull Requests
+
+* Fork the project.
+* Make your feature addition or bug fix.
+* Add tests for it. This is important so I don't break it in a
+ future version unintentionally.
+* Commit, do not mess with rakefile, version, or history.
+ (if you want to have your own version, that is fine but
+ bump version in a commit by itself I can ignore when I pull)
+* Send me a pull request. Bonus points for topic branches.
+
+== Copyright
+
+Copyright (c) 2010 Masaki Komagata. See LICENSE for details.
View
@@ -0,0 +1,26 @@
+require 'sinatra'
+require 'haml'
+require 'sass'
+
+set :haml, {:attr_wrapper => '"', :ugly => false}
+set :sass, {:style => :expanded}
+
+get '/' do
+ haml :index
+end
+
+post '/' do
+ key = OpenSSL::PKey::RSA.new(1024)
+ @private_key = key
+ @public_key = key.public_key
+ haml :created
+end
+
+
+get '/*.css' do |path|
+ content_type 'text/css'
+ sass path.to_sym, :sass => {:load_paths => [settings.views]}
+end
+
+helpers do
+end
View
@@ -0,0 +1,5 @@
+require 'rubygems'
+require 'bundler'
+Bundler.setup
+require 'app'
+run Sinatra::Application
View
@@ -0,0 +1,2 @@
+%pre#private-key~ @private_key
+%pre#public-key~ @public_key
View
@@ -0,0 +1,2 @@
+%form{:method => "post"}
+ %input{:type => "submit", :value => "GENERATE KEYS"}
View
@@ -0,0 +1,29 @@
+!!! XML
+!!!
+%html
+ %head
+ %meta{'http-equiv' => 'Content-Type', 'content' => 'text/html; charset=utf-8'}
+ %meta{'http-equiv' => 'Content-Style-Type', 'content' => 'text/css'}
+ %meta{'http-equiv' => 'Content-Script-Type', 'content' => 'text/javascript'}
+ %meta{:name => 'description', :content => '次の祝日を教えてくれるサービス'}
+ %meta{:name => 'keywords', :content => '祝日,お休み,休日,お出かけ'}
+ %title FJORD KEYS
+ %link{:href => 'style.css', :rel => 'stylesheet', :type => 'text/css'}
+ %link{:rel => 'shortcut icon', :href => '/favicon.ico'}
+ %body
+ #main
+ %h1
+ %a{:href => "/"} FJORD KEYS
+ = yield
+ #footer
+ %p.copyright
+ Copyright &copy; <a href="http://fjord.jp">FJORD, LLC</a> Created by <a href="http://twitter.com/machida">@machida</a> and <a href="http://twitter.com/komagata">@komagata</a>
+ :javascript
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-2927688-10']);
+ _gaq.push(['_trackPageview']);
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
View
@@ -0,0 +1,2 @@
+body
+ font-size: 14px

0 comments on commit 6fd9556

Please sign in to comment.