Permalink
Browse files

Initial commit.

  • Loading branch information...
0 parents commit 54fc99230bc9a07117c049f4d0a60f0216793b16 @lucassus committed Nov 12, 2012
@@ -0,0 +1,4 @@
+.DS_Store
+results.html
+pkg
+html
@@ -0,0 +1,4 @@
+source 'https://rubygems.org'
+
+# Specify your gem's dependencies in mongo_browser.gemspec
+gemspec
22 LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2012 Łukasz Bandzarewicz
+
+MIT License
+
+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.
@@ -0,0 +1,29 @@
+# MongoBrowser
+
+TODO: Write a gem description
+
+## Installation
+
+Add this line to your application's Gemfile:
+
+ gem 'mongo_browser'
+
+And then execute:
+
+ $ bundle
+
+Or install it yourself as:
+
+ $ gem install mongo_browser
+
+## Usage
+
+TODO: Write usage instructions here
+
+## Contributing
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Add some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request
@@ -0,0 +1,19 @@
+= mongo_browser - DESCRIBE YOUR GEM
+
+Author:: YOUR NAME (YOUR EMAIL)
+Copyright:: Copyright (c) 2012 YOUR NAME
+
+
+DESCRIBE YOUR GEM HERE
+
+== Links
+
+* {Source on Github}[LINK TO GITHUB]
+* RDoc[LINK TO RDOC.INFO]
+
+== Install
+
+== Examples
+
+== Contributing
+
@@ -0,0 +1,61 @@
+def dump_load_path
+ puts $LOAD_PATH.join("\n")
+ found = nil
+ $LOAD_PATH.each do |path|
+ if File.exists?(File.join(path,"rspec"))
+ puts "Found rspec in #{path}"
+ if File.exists?(File.join(path,"rspec","core"))
+ puts "Found core"
+ if File.exists?(File.join(path,"rspec","core","rake_task"))
+ puts "Found rake_task"
+ found = path
+ else
+ puts "!! no rake_task"
+ end
+ else
+ puts "!!! no core"
+ end
+ end
+ end
+ if found.nil?
+ puts "Didn't find rspec/core/rake_task anywhere"
+ else
+ puts "Found in #{path}"
+ end
+end
+require 'bundler'
+require 'rake/clean'
+
+require 'rake/testtask'
+
+require 'cucumber'
+require 'cucumber/rake/task'
+gem 'rdoc' # we need the installed RDoc gem, not the system one
+require 'rdoc/task'
+
+include Rake::DSL
+
+Bundler::GemHelper.install_tasks
+
+
+Rake::TestTask.new do |t|
+ t.pattern = 'test/tc_*.rb'
+end
+
+
+CUKE_RESULTS = 'results.html'
+CLEAN << CUKE_RESULTS
+Cucumber::Rake::Task.new(:features) do |t|
+ t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty --no-source -x"
+ t.fork = false
+end
+
+Rake::RDocTask.new do |rd|
+
+ rd.main = "README.rdoc"
+
+ rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
+end
+
+task :default => [:test,:features]
+
@@ -0,0 +1,43 @@
+#!/usr/bin/env ruby
+
+require 'optparse'
+require 'methadone'
+require 'mongo_browser'
+
+class App
+ include Methadone::Main
+ include Methadone::CLILogging
+
+ main do # Add args you want: |like,so|
+ # your program code here
+ # You can access CLI options via
+ # the options Hash
+ end
+
+ # supplemental methods here
+
+ # Declare command-line interface here
+
+ # description "one line description of your app"
+ #
+ # Accept flags via:
+ # on("--flag VAL","Some flag")
+ # options[flag] will contain VAL
+ #
+ # Specify switches via:
+ # on("--[no-]switch","Some switch")
+ #
+ # Or, just call OptionParser methods on opts
+ #
+ # Require an argument
+ # arg :some_arg
+ #
+ # # Make an argument optional
+ # arg :optional_arg, :optional
+
+ version MongoBrowser::VERSION
+
+ use_log_level_option
+
+ go!
+end
@@ -0,0 +1,13 @@
+Feature: My bootstrapped app kinda works
+ In order to get going on coding my awesome app
+ I want to have aruba and cucumber setup
+ So I don't have to do it myself
+
+ Scenario: App just runs
+ When I get help for "mongo_browser"
+ Then the exit status should be 0
+ And the banner should be present
+ And the banner should document that this app takes options
+ And the following options should be documented:
+ |--version|
+ And the banner should document that this app takes no arguments
@@ -0,0 +1 @@
+# Put your step definitions here
@@ -0,0 +1,16 @@
+require 'aruba/cucumber'
+require 'methadone/cucumber'
+
+ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
+LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib')
+
+Before do
+ # Using "announce" causes massive warnings on 1.9.2
+ @puts = true
+ @original_rubylib = ENV['RUBYLIB']
+ ENV['RUBYLIB'] = LIB_DIR + File::PATH_SEPARATOR + ENV['RUBYLIB'].to_s
+end
+
+After do
+ ENV['RUBYLIB'] = @original_rubylib
+end
@@ -0,0 +1,5 @@
+require "mongo_browser/version"
+
+module MongoBrowser
+ # Your code goes here...
+end
@@ -0,0 +1,3 @@
+module MongoBrowser
+ VERSION = "0.0.1"
+end
@@ -0,0 +1,21 @@
+# -*- encoding: utf-8 -*-
+require File.expand_path('../lib/mongo_browser/version', __FILE__)
+
+Gem::Specification.new do |gem|
+ gem.authors = ["Łukasz Bandzarewicz"]
+ gem.email = ["lucassus@gmail.com"]
+ gem.description = %q{TODO: Write a gem description}
+ gem.summary = %q{TODO: Write a gem summary}
+ gem.homepage = ""
+
+ gem.files = `git ls-files`.split($\)
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
+ gem.name = "mongo_browser"
+ gem.require_paths = ["lib"]
+ gem.version = MongoBrowser::VERSION
+ gem.add_development_dependency('rdoc')
+ gem.add_development_dependency('aruba')
+ gem.add_development_dependency('rake', '~> 0.9.2')
+ gem.add_dependency('methadone', '~> 1.2.2')
+end

0 comments on commit 54fc992

Please sign in to comment.