Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ggomagundan committed Nov 15, 2016
0 parents commit 121f60c
Show file tree
Hide file tree
Showing 19 changed files with 934 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*.gem

# Ignore bundler config
/.bundle
/vendor/cache
/vendor/bundle
tmp/
.DS_Store
*/.DS_Store
node_modules
Gemfile.lock
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: ruby

cache: bundler

rvm:
- 2.2
- 2.3.0
- ruby-head

#gemfile:
# - Gemfile
6 changes: 6 additions & 0 deletions CHANGE_LOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Release History

* **v1.0.0** - 2016-11-15
- Initialize Gem Project
- clipboard.js(v1.5.15)
- toastr.js(v2.1.3)
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in md-date-time-picker-rails.gemspec
gemspec
gem 'rake', '~> 10.4.2'
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2016 Kai Park

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.
99 changes: 99 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# clipboard-toastr-rails
[![Gem
Version](https://badge.fury.io/rb/clipboard-toastr-rails.svg)](https://badge.fury.io/rb/clipboard-toastr-rails)

clipboard-toastr-rails gem is the integration of clipboard.js and toastr javascript
library(using 2.2 Version) for your Rails 4, 5 application.

Ruby gems url: https://rubygems.org/gems/clipboard-toastr-rails


## Installation

Add this line to your application's Gemfile:

```ruby
gem 'clipboard-toastr-rails'
```

And then execute:

$ bundle

Or install it yourself as:

$ gem install clipboard-toastr-rails

Now you need to edit your `app/assets/javascripts/application.js` file
and add the following line:
``` javascript
//= require clipboard-toastr
```

And you need to edit your `app/assets/stylesheets/application.css` file
and add the following line:

```css
*= require toastr
```

If Use `app/assets/stylesheets/application.scss` file
```scss
@import "toastr";
```







## Usage

Here is the example working code to test with your Rails application.

Add this sample code to your `app/assets/javascripts/application.js`
file

``` javascript
$(document).ready(function(){



});
```





## Full documentation

The Documentation is at
[Clipboard.js Document](https://clipboardjs.com/)
[Toastr Document](http://codeseven.github.io/toastr/)

## Change Log

Current Version 1.0.0

This link listing [Change Log](https://github.com/ggomagundan/clipboard-toastr-rails/blob/master/CHANGE_LOG.md)


## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


## License

The gem is available as open source under the terms of the [MIT
License](http://opensource.org/licenses/MIT).




12 changes: 12 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require 'rubygems'
require 'rake'
=begin
require 'rake/testtask'
Rake::TestTask.new do |t|
t.libs << 'test'
end
=end

desc "Run tests"
task :default => :test
14 changes: 14 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env ruby

require "bundler/setup"
require "md-date-time-picker-rails"

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.

# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start

require "irb"
IRB.start
7 changes: 7 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

bundle install

# Do any other automated setup that you need to do here
34 changes: 34 additions & 0 deletions clipboard-toastr-rails.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'clipboard-toastr-rails/version'


Gem::Specification.new do |s|
s.name = "clipboard-toastr-rails"
s.version = ClipboardToastr::Rails::VERSION
s.default_executable = "clipboard-toastr-rails"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Kai Park"]
s.date = Date.today.to_s
s.description = %q{clipboard.js and toastr.js to rails Gem}
s.email = %q{ggogun@gmail.com}
s.files = `git ls-files -- {bin,lib,test,vendor}/* {LICENSE*,Rakefile,README*}`.split("\n")

s.test_files = ["test/clipboard_toastr_rails_test.rb"]
s.homepage = %q{https://github.com/ggomagundan/clipboard-toastr-rails}
s.require_paths = ["lib"]
s.rubygems_version = %q{2.0.0}
s.summary = %q{Clipboard and Toast Gem!}
s.licenses = ['MIT']

if s.respond_to? :specification_version then
s.specification_version = 3

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
else
end
else
end
end

2 changes: 2 additions & 0 deletions lib/clipboard-toastr-rails.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require "clipboard-toastr-rails/version"
require "clipboard-toastr-rails/engine" if defined?(::Rails)
6 changes: 6 additions & 0 deletions lib/clipboard-toastr-rails/engine.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module ClipboardToastr
module Rails
class Engine < ::Rails::Engine
end
end
end
5 changes: 5 additions & 0 deletions lib/clipboard-toastr-rails/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module ClipboardToastr
module Rails
VERSION = "1.0.0"
end
end
7 changes: 7 additions & 0 deletions test/clipboard_toastr_rails_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'test_helper'

class ClipboardToastrRailsTest < ActionDispatch::IntegrationTest
test "engine is loaded" do
assert_equal ::Rails::Engine, ClipboardToastr::Rails::Engine.superclass
end
end
7 changes: 7 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Configure Rails Environment
ENV["RAILS_ENV"] = "test"

require File.expand_path("../dummy/config/environment.rb", __FILE__)
require "rails/test_help"

Rails.backtrace_cleaner.remove_silencers!
2 changes: 2 additions & 0 deletions vendor/assets/javascripts/clipboard-toastr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//= require clipboard
//= require toastr
7 changes: 7 additions & 0 deletions vendor/assets/javascripts/clipboard.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 121f60c

Please sign in to comment.