rusic 0.0.4 → 1.0.0.beta1
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.
- checksums.yaml +7 -0
- data/.ruby-version +1 -0
- data/README.md +103 -17
- data/Rakefile +0 -4
- data/bin/rusic +1 -1
- data/lib/rusic/cli.rb +28 -10
- data/lib/rusic/deployer.rb +15 -0
- data/lib/rusic/generators/theme.rb +53 -0
- data/lib/rusic/templates/README.md +3 -0
- data/lib/rusic/templates/assets/bootstrap.css +5789 -0
- data/lib/rusic/templates/assets/bootstrap.js +1951 -0
- data/lib/rusic/templates/assets/cover.css +161 -0
- data/lib/rusic/templates/assets/glyphicons-halflings-regular.eot +0 -0
- data/lib/rusic/templates/assets/glyphicons-halflings-regular.svg +229 -0
- data/lib/rusic/templates/assets/glyphicons-halflings-regular.ttf +0 -0
- data/lib/rusic/templates/assets/glyphicons-halflings-regular.woff +0 -0
- data/lib/rusic/templates/ideas/edit.html.liquid +42 -0
- data/lib/rusic/templates/ideas/index.html.liquid +26 -14
- data/lib/rusic/templates/ideas/new.html.liquid +52 -0
- data/lib/rusic/templates/ideas/show.html.liquid +27 -0
- data/lib/rusic/templates/layouts/subdomain.html.liquid +57 -38
- data/lib/rusic/templates/pages/about.html.liquid +20 -0
- data/lib/rusic/theme_file.rb +43 -0
- data/lib/rusic/uploaders/asset.rb +40 -0
- data/lib/rusic/uploaders/editable_asset.rb +47 -0
- data/lib/rusic/uploaders/template.rb +40 -0
- data/lib/rusic/version.rb +1 -1
- data/lib/rusic.rb +10 -5
- data/rusic.gemspec +23 -23
- metadata +75 -86
- data/.rvmrc +0 -1
- data/TODO.md +0 -33
- data/features/rusic.feature +0 -16
- data/features/support/env.rb +0 -5
- data/lib/rusic/generators.rb +0 -59
- data/lib/rusic/idea.rb +0 -8
- data/lib/rusic/server.rb +0 -35
- data/lib/rusic/templates/rusic.yml +0 -6
- data/spec/rusic_spec.rb +0 -21
data/TODO.md
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
### Management
|
2
|
-
|
3
|
-
To simulate the different states the bucket can be in you can, for the
|
4
|
-
most part, use the web interface. However some things require custom
|
5
|
-
settings, for this you can use the `rusic set` command.
|
6
|
-
|
7
|
-
#### Bucket expires
|
8
|
-
|
9
|
-
To set an expiry date on the bucket, use the following command:
|
10
|
-
|
11
|
-
rusic set expires "in 3 hours"
|
12
|
-
|
13
|
-
#### Bucket name
|
14
|
-
|
15
|
-
rusic set name "My bucket"
|
16
|
-
|
17
|
-
## Features
|
18
|
-
|
19
|
-
* Super long urls
|
20
|
-
* Wide range of markdown examples
|
21
|
-
* Ideas, comments and likes in different states
|
22
|
-
* Toggle the timer for the bucket
|
23
|
-
* Simulate log in and out
|
24
|
-
* Flash messages
|
25
|
-
* Custom fields
|
26
|
-
|
27
|
-
## Publishing themes
|
28
|
-
|
29
|
-
Once you're happy with your theme, you'll want to publish it to your
|
30
|
-
rusic bucket. This can also be done with the `rusic(1)` cli tool.
|
31
|
-
|
32
|
-
The static assets will be shipped off to s3 for you, and the templates
|
33
|
-
will be uploaded using the API.
|
data/features/rusic.feature
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
Feature: Rusic
|
2
|
-
In order to create themes for rusic.com
|
3
|
-
As a designer/developer
|
4
|
-
I want to be able to generate themes from the cli
|
5
|
-
|
6
|
-
Scenario: New project
|
7
|
-
When I run `rusic new example`
|
8
|
-
Then the following files should exist:
|
9
|
-
| example/rusic.yml |
|
10
|
-
| example/layouts/subdomain.html.liquid |
|
11
|
-
| example/ideas/index.html.liquid |
|
12
|
-
| example/ideas/new.html.liquid |
|
13
|
-
| example/ideas/show.html.liquid |
|
14
|
-
| example/ideas/edit.html.liquid |
|
15
|
-
And the file "example/layouts/subdomain.html.liquid" should contain "{{yield}}"
|
16
|
-
And the file "example/ideas/index.html.liquid" should contain "rusic.ideas"
|
data/features/support/env.rb
DELETED
data/lib/rusic/generators.rb
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
require 'thor/group'
|
2
|
-
|
3
|
-
module Rusic
|
4
|
-
module Generators
|
5
|
-
class New < Thor::Group
|
6
|
-
include Thor::Actions
|
7
|
-
|
8
|
-
argument :name, :type => :string
|
9
|
-
|
10
|
-
def self.source_root
|
11
|
-
File.dirname(__FILE__)
|
12
|
-
end
|
13
|
-
|
14
|
-
def create_project
|
15
|
-
empty_directory(name)
|
16
|
-
end
|
17
|
-
|
18
|
-
def copy_rusic_yml
|
19
|
-
template('templates/rusic.yml', "#{name}/rusic.yml")
|
20
|
-
end
|
21
|
-
|
22
|
-
def create_layout_directory
|
23
|
-
empty_directory("#{name}/layouts")
|
24
|
-
end
|
25
|
-
|
26
|
-
def copy_layout
|
27
|
-
template('templates/layouts/subdomain.html.liquid', "#{name}/layouts/subdomain.html.liquid")
|
28
|
-
end
|
29
|
-
|
30
|
-
def create_ideas_directory
|
31
|
-
empty_directory("#{name}/ideas")
|
32
|
-
end
|
33
|
-
|
34
|
-
def copy_ideas_index
|
35
|
-
template('templates/ideas/index.html.liquid', "#{name}/ideas/index.html.liquid")
|
36
|
-
end
|
37
|
-
|
38
|
-
def copy_ideas_new
|
39
|
-
template('templates/ideas/new.html.liquid', "#{name}/ideas/new.html.liquid")
|
40
|
-
end
|
41
|
-
|
42
|
-
def copy_ideas_show
|
43
|
-
template('templates/ideas/show.html.liquid', "#{name}/ideas/show.html.liquid")
|
44
|
-
end
|
45
|
-
|
46
|
-
def copy_ideas_edit
|
47
|
-
template('templates/ideas/edit.html.liquid', "#{name}/ideas/edit.html.liquid")
|
48
|
-
end
|
49
|
-
|
50
|
-
def create_public_directories
|
51
|
-
empty_directory("#{name}/public")
|
52
|
-
empty_directory("#{name}/public/images")
|
53
|
-
empty_directory("#{name}/public/stylesheets")
|
54
|
-
empty_directory("#{name}/public/javascripts")
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
data/lib/rusic/idea.rb
DELETED
data/lib/rusic/server.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
require 'sinatra/base'
|
2
|
-
require 'liquid'
|
3
|
-
require 'yaml'
|
4
|
-
|
5
|
-
module Rusic
|
6
|
-
class Server < Sinatra::Base
|
7
|
-
|
8
|
-
set :views, Dir.pwd
|
9
|
-
|
10
|
-
set :public, Dir.pwd + '/public'
|
11
|
-
|
12
|
-
enable :logging
|
13
|
-
|
14
|
-
helpers do
|
15
|
-
def bucket
|
16
|
-
bucket = YAML.load_file('rusic.yml')['bucket']
|
17
|
-
bucket['ideas'].map! { |i| Idea.new(i) }
|
18
|
-
bucket
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
get '/' do
|
23
|
-
liquid :"ideas/index.html", :layout => :"layouts/subdomain.html", :locals => { :rusic => bucket }
|
24
|
-
end
|
25
|
-
|
26
|
-
get '/ideas/:id' do
|
27
|
-
idea = bucket['ideas'].find { |idea| idea['id'].to_s == params[:id].to_s }
|
28
|
-
|
29
|
-
liquid :"ideas/show.html", :layout => :"layouts/subdomain.html", :locals => {
|
30
|
-
:rusic => bucket,
|
31
|
-
:idea => idea
|
32
|
-
}
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
data/spec/rusic_spec.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'rusic'
|
2
|
-
require 'rack/test'
|
3
|
-
|
4
|
-
describe Rusic::VERSION do
|
5
|
-
it { should match(/\d\.\d\.\d/) }
|
6
|
-
end
|
7
|
-
|
8
|
-
describe Rusic::Server do
|
9
|
-
include Rack::Test::Methods
|
10
|
-
|
11
|
-
def app
|
12
|
-
Rusic::Server
|
13
|
-
end
|
14
|
-
|
15
|
-
describe "GET /" do
|
16
|
-
# it "should be successful" do
|
17
|
-
# get '/'
|
18
|
-
# last_response.status.should be(200)
|
19
|
-
# end
|
20
|
-
end
|
21
|
-
end
|