spindle 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source :rubygems
2
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2012 Jashank Jeremy.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the 'Software'), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
@@ -0,0 +1,8 @@
1
+ Spindle
2
+ =======
3
+
4
+ [![Build Status](https://secure.travis-ci.org/Jashank/spindle.png?branch=master)](http://travis-ci.org/Jashank/spindle)
5
+
6
+ Spindle helps you stay focussed by only providing you one place to be
7
+ distracted. It unifies your email, social media and other services
8
+ down into one place with more configurability and functionality.
@@ -0,0 +1,135 @@
1
+ # -*- ruby -*-
2
+ require 'rubygems'
3
+ require 'rake'
4
+ require 'rdoc'
5
+
6
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w[lib]))
7
+
8
+ #############################################################################
9
+ #
10
+ # Helper functions
11
+ #
12
+ #############################################################################
13
+
14
+ def name
15
+ @name ||= Dir['*.gemspec'].first.split('.').first
16
+ end
17
+
18
+ def version
19
+ line = File.read("lib/#{name}.rb")[/^\s*VERSION\s*=\s*.*/]
20
+ line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
21
+ end
22
+
23
+ def date
24
+ Date.today.to_s
25
+ end
26
+
27
+ def rubyforge_project
28
+ name
29
+ end
30
+
31
+ def gemspec_file
32
+ "#{name}.gemspec"
33
+ end
34
+
35
+ def gem_file
36
+ "#{name}-#{version}.gem"
37
+ end
38
+
39
+ def replace_header(head, header_name)
40
+ head.sub!(/(\.#{header_name}\s*= ').*'/) { "#{$1}#{send(header_name)}'"}
41
+ end
42
+
43
+ #############################################################################
44
+ #
45
+ # Standard tasks
46
+ #
47
+ #############################################################################
48
+
49
+ task :default => [:test]
50
+
51
+ require 'rake/testtask'
52
+ Rake::TestTask.new(:test) do |test|
53
+ test.libs << 'lib' << 'test'
54
+ test.pattern = 'test/**/test_*.rb'
55
+ test.verbose = true
56
+ end
57
+
58
+ desc "Generate RCov test coverage and open in your browser"
59
+ task :coverage do
60
+ require 'rcov'
61
+ sh "rm -fr coverage"
62
+ sh "rcov test/test_*.rb"
63
+ sh "open coverage/index.html"
64
+ end
65
+
66
+ require 'rdoc/task'
67
+ Rake::RDocTask.new do |rdoc|
68
+ rdoc.rdoc_dir = 'rdoc'
69
+ rdoc.title = "#{name} #{version}"
70
+ rdoc.rdoc_files.include('README*')
71
+ rdoc.rdoc_files.include('lib/**/*.rb')
72
+ end
73
+
74
+ desc "Open an irb session preloaded with this library"
75
+ task :console do
76
+ sh "irb -rubygems -r ./lib/#{name}.rb"
77
+ end
78
+
79
+ #############################################################################
80
+ #
81
+ # Custom tasks (add your own tasks here)
82
+ #
83
+ #############################################################################
84
+
85
+ #############################################################################
86
+ #
87
+ # Packaging tasks
88
+ #
89
+ #############################################################################
90
+
91
+ task :release => :build do
92
+ unless `git branch` =~ /^\* master$/
93
+ puts "You must be on the master branch to release!"
94
+ exit!
95
+ end
96
+ sh "git commit --allow-empty -m 'Release #{version}'"
97
+ sh "git tag v#{version}"
98
+ sh "git push origin master"
99
+ sh "git push origin v#{version}"
100
+ sh "gem push pkg/#{name}-#{version}.gem"
101
+ end
102
+
103
+ task :build => :gemspec do
104
+ sh "mkdir -p pkg"
105
+ sh "gem build #{gemspec_file}"
106
+ sh "mv #{gem_file} pkg"
107
+ end
108
+
109
+ task :gemspec do
110
+ # read spec file and split out manifest section
111
+ spec = File.read(gemspec_file)
112
+ head, manifest, tail = spec.split(" # = MANIFEST =\n")
113
+
114
+ # replace name version and date
115
+ replace_header(head, :name)
116
+ replace_header(head, :version)
117
+ replace_header(head, :date)
118
+ #comment this out if your rubyforge_project has a different name
119
+ replace_header(head, :rubyforge_project)
120
+
121
+ # determine file list from git ls-files
122
+ files = `git ls-files`.
123
+ split("\n").
124
+ sort.
125
+ reject { |file| file =~ /^\./ }.
126
+ reject { |file| file =~ /^(rdoc|pkg|coverage)/ }.
127
+ map { |file| " #{file}" }.
128
+ join("\n")
129
+
130
+ # piece file back together and write
131
+ manifest = " s.files = %w[\n#{files}\n ]\n"
132
+ spec = [head, manifest, tail].join(" # = MANIFEST =\n")
133
+ File.open(gemspec_file, 'w') { |io| io.write(spec) }
134
+ puts "Updated #{gemspec_file}"
135
+ end
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'spindle'
5
+
6
+ Spindle.spin()
File without changes
Binary file
Binary file
Binary file
@@ -0,0 +1,165 @@
1
+ #+TITLE: SDD Major Project
2
+ #+AUTHOR: Jashank Jeremy
3
+ #+EMAIL: jashank@rulingia.com
4
+ #+DATE: [2012-07-15 Sun]--[2012-08-03 Fri]
5
+ #+LANGUAGE: en
6
+ #+HOST: inara.rulingia.com
7
+ #+MODE: -*- mode:org; mode:visual-line -*-
8
+ #+STYLE: <link rel="stylesheet" type="text/css" href="stylesheet.css" />
9
+ #+X-OtherPath: ../../../../../../Common/
10
+ #+OPTIONS: d:nil num:t
11
+ #+INFOJS_OPT: toc:nil ltoc:above view:info mouse:underline
12
+ #+STARTUP: indent
13
+
14
+ * Abstract
15
+ This document covers the design and protocols of the /Spindle/ content unifier system and the reference implementation of it, the =spindle= utility.
16
+
17
+ * Defining and Understanding the Problem
18
+ ** Problem Statement
19
+ *** Executive Summary
20
+ To counter the increasing prevalence of social media-induced hyperactivity, a software solution is required that provides a single data sink with a simpler, cleaner, unified interface that spans all the data sources that a user tracks, to reduce distraction, focus the user, and make social media interactions a streamlined workflow.
21
+
22
+ *** Background
23
+ In our modern, high-speed digital and social lives, it is getting harder and harder to effectively manage our time between many rapidly updating data sources; so much so, in fact, that psychological analysis of modern human behaviour is congruent with a diagnosis of attention deficit disorder[fn:abcrn4071112].
24
+
25
+ This change in human behaviour manifests as jumping from task to task, becoming easily distracted by each task, and shows clearly that we are not intended as high-volume data sinks, despite the increasing prevalence of mobile devices upon which we are able to perform our manic multitasking, which we are able to carry on our person and to be distracted by more readily.
26
+
27
+ Attention deficit hyperactivity disorder, which is characterised by an endorphin addiction as a result of constant activity and a constant cycle of self-gratification through the tasks they 'focus' on, can only truly be treated by addressing the root of the endorphin addiction -- immediate deprivation from these activites doesn't resolve the problem; it merely exacerbates it -- and thus psychological assessment and treatment by a specialised occupational therapist is necessary. Some set great store by the drugs currently used to treat the condition, but these are more liable to cause major harm through the undesirable neurochemical interactions that can occur.
28
+
29
+ By not maintaining a clear and straight-forward workflow, we are leaving ourselves vulnerable to information overload as, quite simply, our lives are being flooded with data from sources such as social media, news, weather and email. Constructing a workflow that is user-friendly and provides for optimal use of time through clarity and brevity is, in our modern digital age, straightforward.
30
+
31
+ [fn:abcrn4071112] [[http://www.abc.net.au/rn/4071112][i-Disorder: the psychology of technology from 'All In The Mind' ABC Radio National]]
32
+
33
+ ** IPO Chart
34
+
35
+ | Input | Process | Output |
36
+ |----------------------+------------------+---------------|
37
+ | multi-source content | storage/analysis | mixed content |
38
+
39
+ ** Social and Ethical Preliminary Analysis
40
+ *** Ease of Use
41
+ Building a product that is easy to use is a paramount part of this project, due to the emphasis and reasoning that the project follows: the project is about aggregating interaction with high-volume data sources such as social media services. As such, the emphasis is on building a non-discriminitory, intuitive user interface which has a streamlined and straightforward workflow.
42
+
43
+ Constructing intuitive user interfaces has now become a highly sought-after ability; examining any modern, popular social media service shows the interface designer's emphasis on building an interface that is easy for users of all skill levels to use them; examining, for instance, the /Google+/ social network[fn:googleplus], it is clearly visible how easy it is to generate new content to be distributed to one's followers.
44
+
45
+ In fact, as the World Wide Web has evolved to the second major paradigm, known as "Web 2.0", the emphasis has shifted to dynamic, interactive content, opening the possibilites of responsive user interactions, and using an intuitive interface has become the cornerstone of successful websites. Along the way, web designers and engineers alike have discovered exactly what an intuitive interface is.
46
+
47
+ The downside of an intuitive interface is that it makes it easy to access. When one subscribes to any number of modern social media services, it is easy to simply interact constantly with these services.
48
+
49
+ [fn:googleplus] [[https://plus.google.com/]]
50
+
51
+ *** Gender Bias
52
+ Although, broadly, both genders would be affected by this software solution, building a gender-agnostic solution as suggested in Huff02 [fn:huff02] would not be the most optimal solution to the problem. Huff suggests that discriminating against the gender of a user is unnecessary and, in many cases, potentially offensive to the user.
53
+
54
+ [fn:huff02] Huff, C.W. (2002). /Gender, Software Design, and Occupational Equity/. SIGCSE Bulletin: Inroads 34, 112-115.
55
+
56
+ *** Accessibility of Technical Language
57
+ One of the key requirements of the documentation of the solution, both for users and for developers, is that it must be readable and accessible to the target audience. For end users, this means that the documentation should not be written in unclear technical metalanguage, but instead using syntax and forms that are guaranteed to be understood by all. For developers, the documentation should be complete -- various programming languages provide a range of techniques to ensure this, such as Java's Javadoc[fn:javadoc], Perl's POD[fn:perlpod], or Doxygen[fn:doxygen] -- and a core part of the development process, not a vague afterthought tacked on the sidee.
58
+
59
+ [fn:javadoc] [[http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/][Javadoc]]
60
+
61
+ [fn:perlpod] [[http://perldoc.perl.org/perlpod.html][Perl's Plain Old Documentation format]]
62
+
63
+ [fn:doxygen] [[http://www.doxygen.org/][Doxygen: a documentation generator]]
64
+
65
+ *** Copyright
66
+ In this case, adopting a free and open source model, using standard programming languages and techniques, and licensing the code under a free and open source license would be ideal, as well as utilising an open-source friendly development model such as the 'bazaar' described in Eric S Raymond's seminal work /The Cathedral And The Bazaar/ [fn:catb] model would be optimal.
67
+
68
+ During it's initial development phase, although it follows an open-source model and uses an open-source license, contributions should not be accepted, with the exception of extremely major bugs, likely to block the development of the project. Beyond the end of the 'closed' development period, a move to free submissions would be made.
69
+
70
+ Selecting an open source license is a challenging task, as there are many suitable licenses to choose from. The GNU General Public License, one of the most notable open source software licenses, for instance, is an ideal example. In this case, a license such as the GPL would be less than ideal, due to the (somewhat broad) restrictions it places on some development; instead, a BSD-style license would be more suitable, to facilitate development for multiple platforms and user interfaces.
71
+
72
+ Using a social development service such as GitHub [fn:github] would be, thus, ideal. GitHub is a social network for developers, built around the Git distributed version control system. Considered by many to be the Facebook of developers, GitHub has lead the charge as an open source development site, spawning many sites like it such as LaunchPad (for Bazaar), BitBucket (for Mercurial) and it has pushed the popularity of all social development sites, including the project-oriented, rather than repository-oriented, sites, such as SourceForge, and Savannah. GitHub's model provides free accounts, as well as paid 'private' accounts for corporate and team development, leveraging the same established infrastructure.
73
+
74
+ [fn:catb] /The Cathedral and the Bazaar: Musings on Linux and Open Source by an Accidental Revolutionary/ by Eric S. Raymond analyses two development models that were prevalent in the open source community at the time of writing: the _cathedral_, where the code was centralised and only became available at the time of release, and the _bazaar_ where code was available at all points. It's available online at [[http://www.catb.org/~esr/writings/cathedral-bazaar/][esr's website]], and as a book [[http://oreilly.com/catalog/cb][published]] by [[http://www.oreilly.com/][O'Reilly and Associates]] (famous for technical coverage of many computing technologies).
75
+
76
+ [fn:github] [[http://github.com]]
77
+
78
+ *** Ergonomics and Interface Accessibility
79
+ One key element of simplifying the workflow is making it compliant to relevant human interface guidelines for the platform that the software solution is running on. Building on the work of the IBM Common User Access documents, many desktop environments have released human interface guidelines which cover the way that the human interface should be developed for that platform. During the construction of platform specific desktop and mobile applications, following relevant user interface guidelines for that platform is vital.
80
+
81
+ For the =spindle= reference implementation, a text interface would be
82
+ ideal to provide optimal interface simplicity.
83
+
84
+ * Planning a Software Solution
85
+ ** Identification and justificiation of a suitable development approach
86
+ An agile 'extreme programming' approach would be ideal for this project, based on the developer's experience with key agile goals and methodologies, as well as the projected development and release cycle of the project.
87
+
88
+ Using a structured approach would likely cripple the long-term development of the project, by forcing it within a given mould and ensuring that, to proceed with development, great precision and effort would be required that is simply not available to a single developer.
89
+
90
+ To some extents, agile /is/ prototyping, although the prototypes tend to be more frequent and tested through unit test suites. RAD and end-user would also require the use of a high-level CASE tool to facilitate development, which would be unlikely.
91
+
92
+ ** Recommendation of a relevant CASE tool for management
93
+ Depending on the programming language, the selection of a suitable CASE tool would be for an unobtrusive assistive development tool, much unlike commercial offerings such as those from Borland[fn:borland], Microsoft[fn:msft] or ActiveState[fn:activestate]. Instead, a simpler, language-specific IDE such as Padre[fn:padre], Eclipse[fn:eclipse] or NetBeans[fn:netbeans], or even an augmented text editor such as GNU Emacs[fn:emacs] or Vim[fn:vim].
94
+
95
+ For management, a CASE tool would be limited to version control and issue tracking. The developer would be free to use their preferred development environment -- in this case, a well-refined GNU Emacs on Mac OS X. Almost all required development functionality (version control, file management, compilation, project management, file navigation, etc.) is available within Emacs.
96
+
97
+ [fn:borland] Borland's development products arm (last known as CodeGear before its acquisition by Embarcadero Technologies) produced a large line of products, notably Delphi, C++ Builder and JBuilder. These products build upon a heritage based on Turbo C++ and Turbo Pascal, two famous programming environments of the early 1990s.
98
+
99
+ [fn:msft] Microsoft Visual Studio is a development environment notorious for being slow, buggy and unstable; installing it takes anything up to several hours, and key industry commentators have derided the Visual Studio languages on the basis that the proprietary language extensions that Microsoft have created are unsustainable.
100
+
101
+ [fn:activestate] ActiveState is a Canadian company specialising in building dynamic language environments for, amongst others, Perl, Ruby, Tcl, and Python.
102
+
103
+ [fn:padre] Padre, the "Perl Application Development and Refactoring Environment", is a Perl integrated development environment with significant intelligence at parsing Perl, as well as other languages with a modular extension framework.
104
+
105
+ [fn:eclipse] Eclipse is one of the major integrated development environments targetted at the Java programming language; it is sponsored by the Eclipse Foundation (primarily IBM, but a number of other companies also contribute). It is written in Java and C++. Eclipse, like NetBeans, features a 'platform' known as SWT on which other applications can be built, such as Borland JBuilder and Adobe Flash Builder, and is also the recommended development environment for Android development.
106
+
107
+ [fn:netbeans] NetBeans is one of the major integrated development environments targetted at the Java programming language; it is sponsored by Oracle (formerly Sun Microsystems). It is itself written in Java, and is extensible to support other programming languages. NetBeans, like Eclipse, features a 'platform' known as RCP on which other applications can be built, such as the /VisualVM/ analysis tool for Java.
108
+
109
+ [fn:emacs] Emacs (standing for Editor MACroS), started life as a set of macros for TECO, but eventually evolved and took on a life of its own at the hand of Richard Stallman. Most modern Emacsen use a LISP derivative known as Emacs-Lisp as an extension language -- and, in fact, much of the editor itself is written in Emacs-Lisp.
110
+
111
+ [fn:vim] Vim (standing for Vi IMproved) is a clone of the venerable =vi= text editor, the visual mode of the =ex= editor. Vi derivatives are one of the oldest text editor families still in use today and its users are notoriously part of an ongoing holy war against Emacs users. Vim itself is extensible through a programming language mirroring the function, if not the syntax, of Emacs' LISP dialect.
112
+
113
+ ** Gantt chart
114
+ see a3-gantt.pdf
115
+ *** Milestones
116
+ - database built
117
+ - task interface functional
118
+ - core task responses
119
+ - query API complete
120
+ - scraper complete
121
+ - functional
122
+ ** Design of an appropriate algorithm
123
+ #+BEGIN_EXAMPLE
124
+ begin
125
+ call initialise
126
+ loop forever
127
+ request ← readline
128
+ [task, params...] ← <request>.split ' '
129
+ if <task> in <<routes>.keys> ⇒ begin
130
+ ''' dereference the pointer in the route array '''
131
+ ← call <routes[task]>
132
+ end else ⇒ begin
133
+ print "Error: unknown task"
134
+ end
135
+ end
136
+ call abort
137
+ end
138
+
139
+ initialise: begin
140
+ print "Initialising..."
141
+ GLOBAL[database] ← call db_connect
142
+ GLOBAL[routes] ← call routes_register
143
+ end
144
+
145
+ abort: begin
146
+ print "Aborting!"
147
+ <GLOBAL[database]>.end!
148
+ end
149
+
150
+ #+END_EXAMPLE
151
+ * Building a Software Solution
152
+ ** Peer Evaluation
153
+ ** Logbook
154
+ * Checking a Software Solution
155
+ ** Evaluation
156
+ ** Implementation
157
+ * Modifying a Software Solution
158
+ ** Future Recommendations
159
+ ** Social and Ethical Project Evaluation
160
+ *** Ease of Use
161
+ *** Gender Bias
162
+ *** Accessibility of Technical Language
163
+ *** Copyright
164
+ *** Ergonomics and Interface Accessibility
165
+ * Solution and Documentation
@@ -0,0 +1,53 @@
1
+ body {
2
+ background-color: black;
3
+ color: white;
4
+ width: 50%;
5
+ font-family: 'Garamond', 'Palatino', 'Palladio', serif;
6
+ font-size: 14pt;
7
+ /* DER laptop read/review
8
+ margin-left: 25%;
9
+ margin-right: 25%;
10
+ */
11
+ }
12
+
13
+ tr {
14
+ border-top-width: 2pt;
15
+ border-top-style: solid;
16
+ border-top-color: black;
17
+ }
18
+
19
+ td {
20
+ vertical-align: top;
21
+ }
22
+
23
+ h1, h2, h3, h4, h5, h6, th {
24
+ text-align: left;
25
+ font-family: 'Optima', 'Helvetica', 'Arial', sans-serif;
26
+ }
27
+
28
+ h1.title {
29
+ text-align: center;
30
+ color: #7777cc;
31
+ }
32
+
33
+ p {
34
+ text-align: justify;
35
+ text-indent: 2em;
36
+ margin-top: 0;
37
+ margin-bottom: 1ex;
38
+
39
+ /* I'm game. */
40
+ -webkit-hyphens: auto;
41
+ -moz-hyphens: auto;
42
+ hyphens: auto;
43
+ }
44
+
45
+ li p {
46
+ text-indent: 0px;
47
+ }
48
+
49
+ #postamble {
50
+ text-align: center;
51
+ font-size: 8pt;
52
+ color: #666666;
53
+ }
File without changes
@@ -0,0 +1,42 @@
1
+ require 'rubygems'
2
+ require 'io/console'
3
+ require 'colorize'
4
+
5
+ module Spindle
6
+ VERSION = '0.0.1'
7
+
8
+ def self.version
9
+ return VERSION
10
+ end
11
+
12
+ def self.reaction(message)
13
+ $stdout.write(message)
14
+ len = message.length
15
+ if yield
16
+ $stdout.write(' '*($cols - len - 8) + "[ " + "OK".green + " ]\n")
17
+ else
18
+ $stdout.write(' '*($cols - len - 8) + "[" + "FAILED".red + "]\n")
19
+ end
20
+ end
21
+
22
+ def self.spin()
23
+ $rows, $cols = $stdin.winsize
24
+
25
+ puts ("="*$cols).green
26
+ puts "= ".green + "spindle".green.swap + " " + ("="*($cols-10)).green
27
+ puts ("="*$cols).green
28
+ puts ""
29
+ puts "Launching Spindle #{Spindle.version}... "
30
+
31
+ reaction("Loading configuration...") do
32
+ $_config = Spindle::Config.new
33
+ $config = $_config.to_hash
34
+ end
35
+ reaction("Connecting database...") do
36
+ Spindle::Database.init
37
+ end
38
+ end
39
+
40
+ autoload :Config, 'spindle/config'
41
+ autoload :Database, 'spindle/database'
42
+ end
@@ -0,0 +1,21 @@
1
+ require 'rubygems'
2
+ require 'yaml'
3
+ require 'active_support'
4
+ require 'spindle/mkp'
5
+
6
+ module Spindle
7
+ class Config
8
+ def initialize()
9
+ @c = YAML.load_file('spindle_config.yml')
10
+ @c.recursive_symbolize_keys!
11
+ end
12
+
13
+ def to_hash()
14
+ @c
15
+ end
16
+
17
+ def to_yaml()
18
+ @c.dump
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ require 'active_record'
3
+
4
+ module Spindle
5
+ module Database
6
+ def self.init
7
+ ActiveRecord::Base.establish_connection($config[:database])
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,25 @@
1
+ class Hash
2
+ def symbolize_keys!
3
+ keys.each do |key|
4
+ self[(key.to_sym rescue key) || key] = delete(key)
5
+ end
6
+ self
7
+ end
8
+
9
+ def symbolize_keys
10
+ dup.symbolize_keys!
11
+ end
12
+
13
+ def recursive_symbolize_keys!
14
+ symbolize_keys!
15
+ # symbolize each hash in .values
16
+ values.each{|h| h.recursive_symbolize_keys! if h.is_a?(Hash) }
17
+ # symbolize each hash inside an array in .values
18
+ values.select{|v| v.is_a?(Array) }.flatten.each{|h| h.recursive_symbolize_keys! if h.is_a?(Hash) }
19
+ self
20
+ end
21
+
22
+ def recursive_symbolize_keys
23
+ dup.recursive_symbolize_keys!
24
+ end
25
+ end
@@ -0,0 +1,53 @@
1
+ # -*- ruby -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = 'spindle'
5
+ s.version = '0.0.1'
6
+ s.date = '2012-08-12'
7
+
8
+ s.summary = "A unified sink for high-volume information."
9
+ s.description = "A unified sink for high-volume information such as social media, email, and other services."
10
+
11
+ s.authors = ["Jashank Jeremy"]
12
+ s.email = 'jashank@rulingia.com'
13
+ s.homepage = 'http://github.com/jashank/spindle'
14
+
15
+ s.require_paths = %w[lib]
16
+
17
+ s.executables = ["spindle"]
18
+
19
+ s.rdoc_options = ["--charset=UTF-8"]
20
+ s.extra_rdoc_files = %w[README.md LICENSE]
21
+
22
+ s.add_development_dependency('rake', "~> 0.9")
23
+ s.add_development_dependency('rdoc', "~> 3.11")
24
+
25
+ s.add_runtime_dependency('activerecord', "~> 3.2.0")
26
+ s.add_runtime_dependency('activesupport', "~> 3.2.0")
27
+ s.add_runtime_dependency('colorize', "~> 0.5.0")
28
+ s.add_runtime_dependency('cinch', "~> 2.0.0")
29
+
30
+ # = MANIFEST =
31
+ s.files = %w[
32
+ Gemfile
33
+ LICENSE
34
+ README.md
35
+ Rakefile
36
+ bin/.directory
37
+ bin/spindle
38
+ doc/.directory
39
+ doc/a3-1.pdf
40
+ doc/a3-gantt.ods
41
+ doc/a3-gantt.pdf
42
+ doc/a3.org
43
+ doc/stylesheet.css
44
+ lib/.directory
45
+ lib/spindle.rb
46
+ lib/spindle/config.rb
47
+ lib/spindle/database.rb
48
+ lib/spindle/mkp.rb
49
+ spindle.gemspec
50
+ spindle_config.yml
51
+ ]
52
+ # = MANIFEST =
53
+ end
@@ -0,0 +1,6 @@
1
+ database:
2
+ adapter: mysql
3
+ host: localhost
4
+ username: spindle
5
+ password: spindle
6
+ database: spindle
metadata ADDED
@@ -0,0 +1,170 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spindle
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Jashank Jeremy
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-08-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '0.9'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '0.9'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rdoc
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '3.11'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '3.11'
46
+ - !ruby/object:Gem::Dependency
47
+ name: activerecord
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 3.2.0
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 3.2.0
62
+ - !ruby/object:Gem::Dependency
63
+ name: activesupport
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 3.2.0
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 3.2.0
78
+ - !ruby/object:Gem::Dependency
79
+ name: colorize
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: 0.5.0
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 0.5.0
94
+ - !ruby/object:Gem::Dependency
95
+ name: cinch
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: 2.0.0
102
+ type: :runtime
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 2.0.0
110
+ description: A unified sink for high-volume information such as social media, email,
111
+ and other services.
112
+ email: jashank@rulingia.com
113
+ executables:
114
+ - spindle
115
+ extensions: []
116
+ extra_rdoc_files:
117
+ - README.md
118
+ - LICENSE
119
+ files:
120
+ - Gemfile
121
+ - LICENSE
122
+ - README.md
123
+ - Rakefile
124
+ - bin/.directory
125
+ - bin/spindle
126
+ - doc/.directory
127
+ - doc/a3-1.pdf
128
+ - doc/a3-gantt.ods
129
+ - doc/a3-gantt.pdf
130
+ - doc/a3.org
131
+ - doc/stylesheet.css
132
+ - lib/.directory
133
+ - lib/spindle.rb
134
+ - lib/spindle/config.rb
135
+ - lib/spindle/database.rb
136
+ - lib/spindle/mkp.rb
137
+ - spindle.gemspec
138
+ - spindle_config.yml
139
+ homepage: http://github.com/jashank/spindle
140
+ licenses: []
141
+ post_install_message:
142
+ rdoc_options:
143
+ - --charset=UTF-8
144
+ require_paths:
145
+ - lib
146
+ required_ruby_version: !ruby/object:Gem::Requirement
147
+ none: false
148
+ requirements:
149
+ - - ! '>='
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ segments:
153
+ - 0
154
+ hash: -2270909026422571860
155
+ required_rubygems_version: !ruby/object:Gem::Requirement
156
+ none: false
157
+ requirements:
158
+ - - ! '>='
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ segments:
162
+ - 0
163
+ hash: -2270909026422571860
164
+ requirements: []
165
+ rubyforge_project:
166
+ rubygems_version: 1.8.24
167
+ signing_key:
168
+ specification_version: 3
169
+ summary: A unified sink for high-volume information.
170
+ test_files: []