[logaling-commit] logaling/logalimacs at 1014ed3 [master] Delete needless file for marmalade's uploading

Zurück zum Archiv-Index

Yuta Yamada null+****@clear*****
Wed Sep 18 02:44:11 JST 2013


Yuta Yamada	2013-09-18 02:44:11 +0900 (Wed, 18 Sep 2013)

  New Revision: 1014ed3aedce760d3241404283068f6a35c34492
  https://github.com/logaling/logalimacs/commit/1014ed3aedce760d3241404283068f6a35c34492

  Message:
    Delete needless file for marmalade's uploading

  Removed files:
    Rakefile

  Deleted: Rakefile (+0 -84) 100644
===================================================================
--- Rakefile    2013-09-18 02:41:35 +0900 (df2f2e9)
+++ /dev/null
@@ -1,84 +0,0 @@
-# -*- mode: ruby; coding: utf-8 -*-
-
-# This program is Rakefile for marmalade(Repository site for Emacs lisp). 
-# You can possible to create package-directory for marmalade.
-
-# Input your configuration
-PACKAGE_NAME = "logalimacs"
-PACKAGE_VERSION = "1.0.0"
-REQUIREMENTS = ["logalimacs.el"]
-DESCRIPTION = "Front-end of logaling-command for Ruby gem"
-
-# Depending on other package
-# @example specify as bellow:
-#   [["package1", "version1"], ["package2", "virsion2"], ...]
-DEPENDENCIES = [["popwin", "0.4"], ["popup", "0.5"]]
-
-#--rakefile--
-
-require "net/http"
-require "json"
-
-task :default => :package
-
-desc "Package #{PACKAGE_NAME}"
-task :package => :bundle do
-  sh("tar", "cvf", "#{MARMALADE_PACKAGE_NAME}.tar", MARMALADE_PACKAGE_NAME)
-end
-
-desc "Bundle #{PACKAGE_NAME}"
-task :bundle => :init do
-  rm_rf(MARMALADE_PACKAGE_NAME)
-  rm_rf("#{MARMALADE_PACKAGE_NAME}.tar")
-  mkdir(MARMALADE_PACKAGE_NAME)
-  REQUIREMENTS.each do |file|
-    cp(file, MARMALADE_PACKAGE_NAME)
-  end
-  open("#{MARMALADE_PACKAGE_NAME}/#{PKG_EL}", "w") do |content|
-    content.print(PKG_EL_CONTENT)
-  end
-end
-
-desc "Sets constant"
-task :init => "Rakefile" do
-  dependencies = "'("
-  DEPENDENCIES.each {|pkg, version| dependencies << %Q{(#{pkg} "#{version}")}}
-  dependencies << ")"
-  MARMALADE_PACKAGE_NAME = "#{PACKAGE_NAME}-#{PACKAGE_VERSION}"
-  PKG_EL = "#{PACKAGE_NAME}-pkg.el"
-  PKG_EL_CONTENT = <<-ELISP
-(define-package "#{PACKAGE_NAME}" "#{PACKAGE_VERSION}" "#{DESCRIPTION}" #{dependencies})
-ELISP
-end
-
-def read_password
-  print("Password: ")
-  system("stty -echo")
-  input = $stdin.gets.chomp
-  system("stty echo")
-  puts
-  input
-end
-
-desc "Uploads package"
-task :upload => :package do
-  print("User name: ")
-  user = $stdin.gets.chomp
-  password = read_password
-
-  marmalade_api_base_url = "http://marmalade-repo.org"
-  login_url = URI.parse("#{marmalade_api_base_url}/v1/users/login")
-  response = Net::HTTP.post_form(login_url,
-                                 {"name" => user, "password" => password})
-  if response.code != "200"
-    raise "failed to login (#{user}): #{response.body}"
-  end
-  login_info = JSON.parse(response.body)
-  token = login_info["token"]
-
-  sh("curl",
-     "-F", "name=#{user}",
-     "-F", "token=#{token}",
-     "-F", "package=@#{MARMALADE_PACKAGE_NAME}.tar",
-     "#{marmalade_api_base_url}/v1/packages")
-end
-------------- next part --------------
An HTML attachment was scrubbed...
Download 



More information about the logaling-commit mailing list
Zurück zum Archiv-Index