siteleaf 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -15,3 +15,5 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+
19
+ .DS_Store
data/README.md CHANGED
@@ -1,20 +1,19 @@
1
- Siteleaf
2
- ==========
1
+ Siteleaf Gem
2
+ ============
3
+
4
+ - [Installation](#installation)
5
+ - [Testing sites locally](#testing-sites-locally)
6
+ - [Using this gem in your application](#using-this-gem-in-your-application)
7
+ - [Using the API](#using-the-api)
8
+ - [Troubleshooting](#troubleshooting)
9
+ - [Contributing](#contributing)
3
10
 
4
11
  Installation
5
12
  ------------
6
13
 
7
- Build gem from source:
8
-
9
- gem build siteleaf.gemspec
10
-
11
- Then install with:
14
+ The Siteleaf gem is available for installation on [Rubygems](https://rubygems.org/gems/siteleaf). To install run:
12
15
 
13
16
  gem install siteleaf
14
-
15
- To use this gem in your application, add the following to your Gemfile:
16
-
17
- gem 'siteleaf', :git => 'git://github.com/siteleaf/siteleaf-gem.git'
18
17
 
19
18
 
20
19
  Testing sites locally
@@ -22,22 +21,42 @@ Testing sites locally
22
21
 
23
22
  The Siteleaf gem allows you to test and develop your sites locally.
24
23
 
25
- Set up a new site locally:
24
+ **Set up a new site locally:**
26
25
 
27
26
  siteleaf new yoursite.com
28
27
 
29
- Configure an existing site:
28
+ This will create a new theme folder in the directory where you ran this command. It will also create the site for you in your Siteleaf account.
29
+
30
+ **Configure an existing site:**
30
31
 
31
32
  siteleaf config yoursite.com
32
33
 
34
+ **(Optional) Install Pow for extra goodness:**
35
+
33
36
  If using [Pow](http://pow.cx), your local website will be automatically set up and can be accessed at `http://yoursite.dev`.
34
37
 
35
- Local sites can also be manually run:
38
+ If you don't have Pow (or Anvil) installed, run:
39
+
40
+ curl get.pow.cx | sh
41
+
42
+ **Or if you don't want to install Pow, local sites can also be manually run:**
36
43
 
37
44
  siteleaf server
38
45
 
39
46
  In this case, your local site can be accessed at `http://localhost:9292`.
40
47
 
48
+ **Lastly...**
49
+
50
+ Your local folder should contain at least one template file (`default.html`), for sample themes and documentation see: https://github.com/siteleaf/siteleaf-themes
51
+
52
+
53
+ Using this gem in your application
54
+ ----------------------------------
55
+
56
+ To use this gem in your application, add the following to your Gemfile:
57
+
58
+ gem 'siteleaf', :git => 'git://github.com/siteleaf/siteleaf-gem.git'
59
+
41
60
 
42
61
  Using the API
43
62
  -------------
@@ -101,6 +120,15 @@ page.delete
101
120
  Siteleaf::Page.delete('519719ddcc85910626000001')
102
121
  ```
103
122
 
123
+ Troubleshooting
124
+ ------------
125
+
126
+ **I can't install the Gem**
127
+
128
+ Try running:
129
+
130
+ sudo gem install siteleaf
131
+
104
132
 
105
133
  Contributing
106
134
  ------------
@@ -59,7 +59,11 @@ module Siteleaf
59
59
  end
60
60
 
61
61
  output = site.preview(url, template_data)
62
- [200, {'Content-Type' => output.headers[:content_type]}, [output]]
62
+ if output.respond_to?('headers')
63
+ [200, {'Content-Type' => output.headers[:content_type]}, [output]]
64
+ else
65
+ [200, {'Content-Type' => 'text/html'}, [output]]
66
+ end
63
67
  end
64
68
  end
65
69
  end
@@ -1,3 +1,3 @@
1
1
  module Siteleaf
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
data/siteleaf.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |gem|
8
8
  gem.version = Siteleaf::VERSION
9
9
  gem.authors = ["Siteleaf"]
10
10
  gem.email = ["api@siteleaf.com"]
11
- gem.description = %q{A Ruby interface to the Siteleaf API.}
12
- gem.summary = gem.description
11
+ gem.description = %q{A Ruby interface and command line utility for the Siteleaf API.}
12
+ gem.summary = "Siteleaf Ruby interface"
13
13
  gem.homepage = "http://siteleaf.com"
14
14
 
15
15
  # gem.required_ruby_version = '>= 1.9.2'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: siteleaf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -43,7 +43,7 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
- description: A Ruby interface to the Siteleaf API.
46
+ description: A Ruby interface and command line utility for the Siteleaf API.
47
47
  email:
48
48
  - api@siteleaf.com
49
49
  executables:
@@ -51,7 +51,6 @@ executables:
51
51
  extensions: []
52
52
  extra_rdoc_files: []
53
53
  files:
54
- - .DS_Store
55
54
  - .gitignore
56
55
  - Gemfile
57
56
  - LICENSE.txt
@@ -59,7 +58,6 @@ files:
59
58
  - Rakefile
60
59
  - bin/siteleaf
61
60
  - lib/siteleaf.rb
62
- - lib/siteleaf/.DS_Store
63
61
  - lib/siteleaf/client.rb
64
62
  - lib/siteleaf/entity.rb
65
63
  - lib/siteleaf/meta.rb
@@ -93,5 +91,5 @@ rubyforge_project:
93
91
  rubygems_version: 1.8.23
94
92
  signing_key:
95
93
  specification_version: 3
96
- summary: A Ruby interface to the Siteleaf API.
94
+ summary: Siteleaf Ruby interface
97
95
  test_files: []
data/.DS_Store DELETED
Binary file
Binary file