rypple 0.0.5 → 0.0.6

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.
data/README.markdown ADDED
@@ -0,0 +1,26 @@
1
+ # Overview
2
+ A tool for integrating some remote file store (e.g. Dropbox) with a static site generator (e.g. jekyll) with some tools to ease remote updating of the site.
3
+
4
+ # Installation
5
+ The easiest method to install Rypple is to use (RubyGems)[https://rubygems.org/]. To do so, simply install RubyGems, and at the command prompt type:
6
+ gem install rypple
7
+
8
+ For some sites, such as (NSFN)[https://www.nearlyfreespeech.net/], this should be modified to:
9
+ RB_USER_INSTALL=true gem install rypple
10
+
11
+ ## Configuration
12
+ Once installed, Rypple needs to be configured for each site being synced by it. This is done through the rypple command, and can be initiated using the command:
13
+ rypple -s
14
+
15
+ Which kicks off the configuration process. This process will guide you through several important configuration options.
16
+ 1. Rypple site directory. This is the directory to which files will be saved - by default, this is set to $HOME/ryppleSite, but can be changed to any site you wish. This is not the location which will be publicly accessible, so please do not point this at your web server.
17
+ 2. Dropbox API Configuration
18
+ 1. Generate a Dropbox API key/secret pair from their website. IMPORTANT: When creating the key, there is a question about granting the API access to your entire Dropbox folder, or only a sandboxed folder. This option, as far as I can tell, is immutable - Rypple supports either, but be aware of the choice being made.
19
+ 2. Enter the API key and secret.
20
+ 3. Select the API access mode the API key/secret were configured to allow. This option must match what was specified earlier, or else the system won't be able to connect.
21
+ 3. Visit the webpage requested by the setup script to complete the configuration step.
22
+ 3. (Optional) Configure the web host to use Ruby Gems.
23
+ 4. Select the location for the static site generator to output files. This goes into configuring the sync portal for your site.
24
+ 5. (Optional) Enable basic user authentication through a .htaccess file. This allows you to create a user/password combination for the sync portal, so bots don't spam the form to cause your site to update.
25
+ 6. Wait for the first update to complete. Everything should sync and be ready to go!
26
+
data/lib/rypple/base.rb CHANGED
@@ -15,16 +15,16 @@ module Rypple
15
15
  }
16
16
  }
17
17
 
18
- DropboxKeyFile = "dropbox_session.yml"
18
+ DropboxKeyFile = ".dropbox_session.yml"
19
19
  RyppleConfigFile = "rypple.yml"
20
20
 
21
21
  def Rypple.connectToDropbox(path)
22
22
  session = nil
23
23
  dropboxKeys = {:access_type => :app_folder}
24
- dropConf = File.join(path, DropboxKeyFile)
24
+ dropConfPath = File.join(path, DropboxKeyFile)
25
25
  #Load Dropbox API dropboxKeys from file, if applicable.
26
- if File.exists?(dropConf)
27
- dropboxKeys = YAML::load(File.read(dropConf))
26
+ if File.exists?(dropConfPath)
27
+ dropboxKeys = YAML::load(File.read(dropConfPath))
28
28
  end
29
29
 
30
30
  if dropboxKeys.has_key?(:session)
@@ -60,14 +60,6 @@ module Rypple
60
60
  conf.merge!(loadedConf)
61
61
  end
62
62
 
63
- conf[:destinationDir] = File.expand_path(conf[:destinationDir])
64
- if !File.directory?(conf[:destinationDir])
65
- begin
66
- Dir.mkdir(conf[:destinationDir])
67
- rescue SystemCallError
68
- raise RuntimeError, "Destination doesn't exist and cannot be created."
69
- end
70
- end
71
63
  return conf
72
64
  end
73
65
 
data/lib/rypple/setup.rb CHANGED
@@ -77,7 +77,7 @@ def Rypple.Setup()
77
77
  end
78
78
 
79
79
  conf = Rypple.loadConfiguration(configBase)
80
- conf[:destinationDir] = directory
80
+ conf[:destinationDir] = File.expand_path(directory)
81
81
  session, client, keys = Rypple.connectToDropbox(configBase)
82
82
 
83
83
  if !conf.nil? and !keys.nil?
@@ -1,3 +1,3 @@
1
1
  module Rypple
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rypple
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jason Ziglar
@@ -58,6 +58,7 @@ extra_rdoc_files: []
58
58
  files:
59
59
  - Gemfile
60
60
  - README
61
+ - README.markdown
61
62
  - Rakefile
62
63
  - bin/rypple
63
64
  - bin/ryppleInstall